if (typeof talentLANG == "undefined")
	var talentLANG = "zhCN";
if (typeof talentVER == "undefined")
	var talentVER = [];
function langname(b) {
	var c = "UNKNOWN";
	switch (b) {
		case "zhCN" :
			c = "\u7b80\u4f53\u4e2d\u6587";
			break;
		case "zhTW" :
			c = "\u7e41\u9ad4\u4e2d\u6587";
			break;
		case "enUS" :
			c = "English"
	}
	return c
}
function link_178db(b, c, e) {
	e = e || talentLANG;
	switch (e) {
		case "zhCN" :
			e = "cn";
			break;
		case "zhTW" :
			e = "tw";
			break;
		case "enUS" :
			e = "en"
	}
	return "http://db.178.com/wow/" + e + "/" + b + "/" + c + ".html"
}
function icon_178db(b, c) {
	return "http://db1.178.com/wow/icons/" + c.substr(0, 1) + "/"
			+ b.toLowerCase() + "." + (c == "tiny" ? "gif" : "jpg")
}
var class178page = {
	1 : "http://wow.178.com/zs/",
	2 : "http://wow.178.com/sq/",
	3 : "http://wow.178.com/lr/",
	4 : "http://wow.178.com/dz/",
	5 : "http://wow.178.com/ms/",
	6 : "http://wow.178.com/dk/",
	7 : "http://wow.178.com/sm/",
	8 : "http://wow.178.com/fs/",
	9 : "http://wow.178.com/ss/",
	11 : "http://wow.178.com/dly/"
}, talentDomain = document.domain, talentPath = "http://wow.178.com/talent_data/", talentL = [], g_chr_classes = {}, g_item_glyphs = {}, g_spell_skills = {}, LANG = {};
if (typeof $WH == "undefined")
	var $WH = {};
$WH.$E = function(b) {
	if (!b)
		if (typeof event != "undefined")
			b = event;
		else
			return null;
	if (b.which)
		b._button = b.which;
	else if (b._button = b.button, $WH.Browser.ie6789 && b._button)
		if (b._button & 4)
			b._button = 2;
		else {
			if (b._button & 2)
				b._button = 3
		}
	else
		b._button = b.button + 1;
	b._target = b.target ? b.target : b.srcElement;
	b._wheelDelta = b.wheelDelta ? b.wheelDelta : -b.detail;
	return b
};
$WH.$A = function(b) {
	for (var c = [], e = 0, f = b.length; e < f; ++e)
		c.push(b[e]);
	return c
};
if (!Function.prototype.bind)
	Function.prototype.bind = function() {
		var b = this, c = $WH.$A(arguments), e = c.shift();
		return function() {
			return b.apply(e, c.concat($WH.$A(arguments)))
		}
	};
$WH.bindfunc = function() {
	args = $WH.$A(arguments);
	var b = args.shift(), c = args.shift();
	return function() {
		return b.apply(c, args.concat($WH.$A(arguments)))
	}
};
if (!String.prototype.ltrim)
	String.prototype.ltrim = function() {
		return this.replace(/^\s*/, "")
	};
if (!String.prototype.rtrim)
	String.prototype.rtrim = function() {
		return this.replace(/\s*$/, "")
	};
if (!String.prototype.trim)
	String.prototype.trim = function() {
		return this.ltrim().rtrim()
	};
if (!String.prototype.removeAllWhitespace)
	String.prototype.removeAllWhitespace = function() {
		return this.replace("/s+/g", "")
	};
$WH.strcmp = function(b, c) {
	if (b == c)
		return 0;
	if (b == null)
		return -1;
	if (c == null)
		return 1;
	var e = parseFloat(b), f = parseFloat(c);
	if (!isNaN(e) && !isNaN(f) && e != f)
		return e < f ? -1 : 1;
	if (typeof b == "string" && typeof c == "string")
		return b.localeCompare(c);
	return b < c ? -1 : 1
};
$WH.trim = function(b) {
	return b.replace(/(^\s*|\s*$)/g, "")
};
$WH.rtrim = function(b, c) {
	for (var e = b.length; --e > 0 && b.charAt(e) == c;);
	b = b.substring(0, e + 1);
	b == c && (b = "");
	return b
};
$WH.sprintf = function(b) {
	var c;
	c = 1;
	for (len = arguments.length; c < len; ++c)
		b = b.replace("$" + c, arguments[c]);
	return b
};
$WH.sprintfa = function(b) {
	var c;
	c = 1;
	for (len = arguments.length; c < len; ++c)
		b = b.replace(RegExp("\\$" + c, "g"), arguments[c]);
	return b
};
$WH.sprintfo = function(b) {
	if (typeof b == "object" && b.length) {
		var c = b, b = c[0], e;
		for (e = 1; e < c.length; ++e)
			b = b.replace("$" + e, c[e]);
		return b
	}
};
$WH.str_replace = function(b, c, e) {
	for (; b.indexOf(c) != -1;)
		b = b.replace(c, e);
	return b
};
$WH.urlencode = function(b) {
	b = encodeURIComponent(b);
	return b = $WH.str_replace(b, "+", "%2B")
};
$WH.urlencode2 = function(b) {
	b = encodeURIComponent(b);
	b = $WH.str_replace(b, "%20", "+");
	return b = $WH.str_replace(b, "%3D", "=")
};
$WH.number_format = function(b) {
	x = ("" + parseFloat(b)).split(".");
	b = x[0];
	x = x.length > 1 ? "." + x[1] : "";
	if (b.length <= 3)
		return b + x;
	return $WH.number_format(b.substr(0, b.length - 3)) + ","
			+ b.substr(b.length - 3) + x
};
$WH.is_array = function(b) {
	return !!(b && b.constructor == Array)
};
$WH.in_array = function(b, c, e, f) {
	if (b == null)
		return -1;
	if (e)
		return $WH.in_arrayf(b, c, e, f);
	e = f || 0;
	for (f = b.length; e < f; ++e)
		if (b[e] == c)
			return e;
	return -1
};
$WH.in_arrayf = function(b, c, e, f) {
	for (var f = f || 0, g = b.length; f < g; ++f)
		if (e(b[f]) == c)
			return f;
	return -1
};
$WH.rs = function() {
	for (var b = $WH.rs.random, c = "", e = 0; e < 16; e++) {
		var f = Math.floor(Math.random() * b.length);
		e == 0 && f < 11 && (f += 10);
		c += b.substring(f, f + 1)
	}
	return c
};
$WH.rs.random = "0123456789abcdefghiklmnopqrstuvwxyz";
$WH.isset = function(b) {
	return typeof window[b] != "undefined"
};
$WH.isset("console") || (console = {
	log : function() {
	}
});
$WH.array_walk = function(b, c, e) {
	for (var f, g = 0, h = b.length; g < h; ++g)
		f = c(b[g], e, b, g), f != null && (b[g] = f)
};
$WH.array_apply = function(b, c, e) {
	for (var f = 0, g = b.length; f < g; ++f)
		c(b[f], e, b, f)
};
$WH.array_filter = function(b, c) {
	for (var e = [], f = 0, g = b.length; f < g; ++f)
		c(b[f]) && e.push(b[f]);
	return e
};
$WH.array_index = function(b, c, e, f) {
	if (!$WH.is_array(b))
		return !1;
	if (!b.__R || f) {
		b.__R = {};
		e || (e = function(b) {
			return b
		});
		for (var f = 0, g = b.length; f < g; ++f)
			b.__R[e(b[f])] = f
	}
	return c == null ? b.__R : !isNaN(b.__R[c])
};
$WH.array_compare = function(b, c) {
	if (b.length != c.length)
		return !1;
	for (var e = {}, f = b.length; f >= 0; --f)
		e[b[f]] = !0;
	for (var g = !0, f = c.length; f >= 0; --f)
		e[c[f]] === void 0 && (g = !1);
	return g
};
$WH.array_unique = function(b) {
	for (var c = [], e = {}, f = b.length - 1; f >= 0; --f)
		e[b[f]] = 1;
	for (f in e)
		c.push(f);
	return c
};
$WH.ge = function(b) {
	if (typeof b != "string")
		return b;
	return document.getElementById(b)
};
$WH.gE = function(b, c) {
	return b.getElementsByTagName(c)
};
$WH.ce = function(b, c, e) {
	b = document.createElement(b);
	c && $WH.cOr(b, c);
	e && $WH.ae(b, e);
	return b
};
$WH.de = function(b) {
	b && b.parentNode && b.parentNode.removeChild(b)
};
$WH.ae = function(b, c) {
	return $WH.is_array(c) ? ($WH.array_apply(c, b.appendChild.bind(b)), c) : b
			.appendChild(c)
};
$WH.aef = function(b, c) {
	return b.insertBefore(c, b.firstChild)
};
$WH.ee = function(b, c) {
	for (c || (c = 0); b.childNodes[c];)
		b.removeChild(b.childNodes[c])
};
$WH.ct = function(b) {
	return document.createTextNode(b)
};
$WH.st = function(b, c) {
	b.firstChild && b.firstChild.nodeType == 3
			? b.firstChild.nodeValue = c
			: $WH.aef(b, $WH.ct(c))
};
$WH.nw = function(b) {
	b.style.whiteSpace = "nowrap"
};
$WH.rf = function() {
	return !1
};
$WH.rf2 = function(b) {
	b = $WH.$E(b);
	if (!b.ctrlKey && !b.shiftKey && !b.altKey && !b.metaKey)
		return !1
};
$WH.tb = function() {
	this.blur()
};
$WH.aE = function(b, c, e) {
	$WH.Browser.ie6789 ? b.attachEvent("on" + c, e) : b.addEventListener(c, e,
			!1)
};
$WH.dE = function(b, c, e) {
	$WH.Browser.ie6789 ? b.detachEvent("on" + c, e) : b.removeEventListener(c,
			e, !1)
};
$WH.sp = function(b) {
	b || (b = event);
	$WH.Browser.ie6789 ? b.cancelBubble = !0 : b.stopPropagation()
};
$WH.sc = function(b, c, e, f, g) {
	var h = new Date, j = b + "=" + escape(e) + "; ";
	h.setDate(h.getDate() + c);
	j += "expires=" + h.toUTCString() + "; ";
	f && (j += "path=" + f + "; ");
	g && (j += "domain=" + g + "; ");
	document.cookie = j;
	$WH.gc(b);
	$WH.gc.C[b] = e
};
$WH.dc = function(b) {
	$WH.sc(b, -1);
	$WH.gc.C[b] = null
};
$WH.gc = function(b) {
	if ($WH.gc.I == null) {
		var c = unescape(document.cookie).split("; ");
		$WH.gc.C = {};
		for (var e = 0, f = c.length; e < f; ++e) {
			var g = c[e].indexOf("="), h;
			g != -1
					? (h = c[e].substr(0, g), g = c[e].substr(g + 1))
					: (h = c[e], g = "");
			$WH.gc.C[h] = g
		}
		$WH.gc.I = 1
	}
	return b ? $WH.gc.C[b] : $WH.gc.C
};
$WH.ns = function(b) {
	if ($WH.Browser.ie6789)
		b.onfocus = $WH.tb, b.onmousedown = b.onselectstart = b.ondragstart = $WH.rf
};
$WH.eO = function(b) {
	for (var c in b)
		delete b[c]
};
$WH.dO = function(b) {
	function c() {
	}
	c.prototype = b;
	return new c
};
$WH.cO = function(b, c) {
	for (var e in c)
		b[e] = c[e] !== null && typeof c[e] == "object" && c[e].length ? c[e]
				.slice(0) : c[e];
	return b
};
$WH.cOr = function(b, c) {
	for (var e in c)
		typeof c[e] == "object" ? c[e].length ? b[e] = c[e].slice(0) : (b[e]
				|| (b[e] = {}), $WH.cOr(b[e], c[e])) : b[e] = c[e];
	return b
};
$WH.Browser = {
	ie : !(!window.attachEvent || window.opera),
	opera : !!window.opera,
	safari : navigator.userAgent.indexOf("Safari") != -1,
	firefox : navigator.userAgent.indexOf("Firefox") != -1,
	chrome : navigator.userAgent.indexOf("Chrome") != -1
};
$WH.Browser.ie9 = $WH.Browser.ie
		&& navigator.userAgent.indexOf("MSIE 9.0") != -1;
$WH.Browser.ie8 = $WH.Browser.ie
		&& navigator.userAgent.indexOf("MSIE 8.0") != -1 && !$WH.Browser.ie9;
$WH.Browser.ie7 = $WH.Browser.ie
		&& navigator.userAgent.indexOf("MSIE 7.0") != -1 && !$WH.Browser.ie8;
$WH.Browser.ie6 = $WH.Browser.ie
		&& navigator.userAgent.indexOf("MSIE 6.0") != -1 && !$WH.Browser.ie7;
$WH.Browser.ie67 = $WH.Browser.ie6 || $WH.Browser.ie7;
$WH.Browser.ie678 = $WH.Browser.ie67 || $WH.Browser.ie8;
$WH.Browser.ie6789 = $WH.Browser.ie678 || $WH.Browser.ie9;
$WH.OS = {
	windows : navigator.appVersion.indexOf("Windows") != -1,
	mac : navigator.appVersion.indexOf("Macintosh") != -1,
	linux : navigator.appVersion.indexOf("Linux") != -1
};
$WH.g_getWindowSize = function() {
	var b = 0, c = 0;
	if (document.documentElement
			&& (document.documentElement.clientWidth || document.documentElement.clientHeight))
		b = document.documentElement.clientWidth, c = document.documentElement.clientHeight;
	else if (document.body
			&& (document.body.clientWidth || document.body.clientHeight))
		b = document.body.clientWidth, c = document.body.clientHeight;
	else if (typeof window.innerWidth == "number")
		b = window.innerWidth, c = window.innerHeight;
	return {
		w : b,
		h : c
	}
};
$WH.g_getScroll = function() {
	var b = 0, c = 0;
	if (typeof window.pageYOffset == "number")
		b = window.pageXOffset, c = window.pageYOffset;
	else if (document.body
			&& (document.body.scrollLeft || document.body.scrollTop))
		b = document.body.scrollLeft, c = document.body.scrollTop;
	else if (document.documentElement
			&& (document.documentElement.scrollLeft || document.documentElement.scrollTop))
		b = document.documentElement.scrollLeft, c = document.documentElement.scrollTop;
	return {
		x : b,
		y : c
	}
};
$WH.g_getCursorPos = function(b) {
	var c;
	if (window.innerHeight)
		c = b.pageX, b = b.pageY;
	else {
		var e = $WH.g_getScroll();
		c = b.clientX + e.x;
		b = b.clientY + e.y
	}
	return {
		x : c,
		y : b
	}
};
$WH.ac = function(b, c) {
	for (var e = 0, f = 0, g; b;) {
		e += b.offsetLeft;
		f += b.offsetTop;
		for (g = b.parentNode; g && g != b.offsetParent && g.offsetParent;) {
			if (g.scrollLeft || g.scrollTop) {
				e -= g.scrollLeft | 0;
				f -= g.scrollTop | 0;
				break
			}
			g = g.parentNode
		}
		b = b.offsetParent
	}
	$WH.isset("Lightbox") && Lightbox.isVisible() && (c = !0);
	c && (g = $WH.g_getScroll(), e += g.x, f += g.y);
	g = [e, f];
	g.x = e;
	g.y = f;
	return g
};
$WH.g_scrollTo = function(b, c) {
	var e, f = $WH.g_getWindowSize(), g = $WH.g_getScroll(), h = f.w, f = f.h, j = g.x, g = g.y, b = $WH
			.ge(b);
	c == null ? c = [] : typeof c == "number" && (c = [c]);
	e = c.length;
	e == 0 ? c[0] = c[1] = c[2] = c[3] = 0 : e == 1
			? c[1] = c[2] = c[3] = c[0]
			: e == 2 ? (c[2] = c[0], c[3] = c[1]) : e == 3 && (c[3] = c[1]);
	e = $WH.ac(b);
	var k = e[0] - c[3], m = e[1] - c[0], l = e[0] + b.offsetWidth + c[1];
	e = e[1] + b.offsetHeight + c[2];
	l - k > h || k < j ? j = k : l - h > j && (j = l - h);
	e - m > f || m < g ? g = m : e - f > g && (g = e - f);
	scrollTo(j, g)
};
$WH.g_createReverseLookupJson = function(b) {
	var c = {}, e;
	for (e in b)
		c[b[e]] = e;
	return c
};
$WH.g_getLocaleFromDomain = function(b) {
	var c = $WH.g_getLocaleFromDomain.L;
	if (b) {
		var e = b.indexOf(".");
		e != -1 && (b = b.substring(0, e))
	}
	return c[b] ? c[b] : 0
};
$WH.g_getLocaleFromDomain.L = {
	fr : 2,
	de : 3,
	es : 6,
	ru : 7,
	www : 0
};
$WH.g_getDomainFromLocale = function(b) {
	var c;
	c = $WH.g_getDomainFromLocale.L
			? $WH.g_getDomainFromLocale.L
			: $WH.g_getDomainFromLocale.L = $WH
					.g_createReverseLookupJson($WH.g_getLocaleFromDomain.L);
	return c[b] ? c[b] : "www"
};
$WH.g_getIdFromTypeName = function(b) {
	var c = $WH.g_getIdFromTypeName.L;
	return c[b] ? c[b] : -1
};
$WH.g_getIdFromTypeName.L = {
	npc : 1,
	object : 2,
	item : 3,
	itemset : 4,
	quest : 5,
	spell : 6,
	zone : 7,
	faction : 8,
	pet : 9,
	achievement : 10,
	title : 11,
	statistic : 16,
	profile : 100
};
$WH.g_ajaxIshRequest = function(b) {
	var c = document.getElementsByTagName("head")[0], e = $WH.g_getGets();
	e.refresh != null
			&& (b += e.refresh.length ? "&refresh=" + e.refresh : "&refresh");
	e.locale != null && (b += "&locale=" + e.locale);
	e.ptr != null && (b += "&ptr");
	$WH.ae(c, $WH.ce("script", {
						type : "text/javascript",
						src : b,
						charset : "utf8"
					}))
};
$WH.g_getGets = function() {
	if ($WH.g_getGets.C != null)
		return $WH.g_getGets.C;
	var b = $WH.g_getQueryString(), b = $WH.g_parseQueryString(b);
	return $WH.g_getGets.C = b
};
$WH.g_getQueryString = function() {
	var b = "";
	location.pathname && (b += location.pathname.substr(1));
	location.search
			&& (location.pathname && (b += "&"), b += location.search.substr(1));
	return b
};
$WH.g_parseQueryString = function(b) {
	for (var b = decodeURIComponent(b), b = b.split("&"), c = {}, e = 0, f = b.length; e < f; ++e)
		$WH.g_splitQueryParam(b[e], c);
	return c
};
$WH.g_splitQueryParam = function(b, c) {
	var e = b.indexOf("="), f;
	e != -1 ? (f = b.substr(0, e), e = b.substr(e + 1)) : (f = b, e = "");
	c[f] = e
};
$WH.g_createRect = function(b, c, e, f) {
	return {
		l : b,
		t : c,
		r : b + e,
		b : c + f
	}
};
$WH.g_intersectRect = function(b, c) {
	return !(b.l >= c.r || c.l >= b.r || b.t >= c.b || c.t >= b.b)
};
$WH.g_convertRatingToPercent = function(b, c, e, f) {
	var g = $WH.g_convertRatingToPercent.RB, h = $WH.g_convertRatingToPercent.LH;
	b < 0 ? b = 1 : b > 85 && (b = 85);
	if ((c == 12 || c == 13 || c == 14 || c == 15) && b < 34)
		b = 34;
	if ((c == 28 || c == 36) && (f == 2 || f == 6 || f == 7 || f == 11))
		g[c] /= 1.3;
	e < 0 && (e = 0);
	return g[c] == null ? 0 : e
			/ g[c]
			/ (b > 80 ? h[b] : b > 70 ? 82 / 52
					* Math.pow(131 / 63, (b - 70) / 10) : b > 60 ? 82
					/ (262 - 3 * b) : b > 10 ? (b - 8) / 52 : 2 / 52)
};
$WH.g_statToJson = {
	1 : "health",
	2 : "mana",
	3 : "agi",
	4 : "str",
	5 : "int",
	6 : "spi",
	7 : "sta",
	8 : "energy",
	9 : "rage",
	10 : "focus",
	13 : "dodgertng",
	14 : "parryrtng",
	16 : "mlehitrtng",
	17 : "rgdhitrtng",
	18 : "splhitrtng",
	19 : "mlecritstrkrtng",
	20 : "rgdcritstrkrtng",
	21 : "splcritstrkrtng",
	22 : "_mlehitrtng",
	23 : "_rgdhitrtng",
	24 : "_splhitrtng",
	25 : "_mlecritstrkrtng",
	26 : "_rgdcritstrkrtng",
	27 : "_splcritstrkrtng",
	28 : "mlehastertng",
	29 : "rgdhastertng",
	30 : "splhastertng",
	31 : "hitrtng",
	32 : "critstrkrtng",
	33 : "_hitrtng",
	34 : "_critstrkrtng",
	35 : "resirtng",
	36 : "hastertng",
	37 : "exprtng",
	38 : "atkpwr",
	39 : "rgdatkpwr",
	41 : "splheal",
	42 : "spldmg",
	43 : "manargn",
	44 : "armorpenrtng",
	45 : "splpwr",
	46 : "healthrgn",
	47 : "splpen",
	49 : "mastrtng",
	50 : "armor",
	51 : "firres",
	52 : "frores",
	53 : "holres",
	54 : "shares",
	55 : "natres",
	56 : "arcres"
};
$WH.g_jsonToStat = {};
for (var i in $WH.g_statToJson)
	$WH.g_jsonToStat[$WH.g_statToJson[i]] = i;
$WH.g_individualToGlobalStat = {
	16 : 31,
	17 : 31,
	18 : 31,
	19 : 32,
	20 : 32,
	21 : 32,
	22 : 33,
	23 : 33,
	24 : 33,
	25 : 34,
	26 : 34,
	27 : 34,
	28 : 36,
	29 : 36,
	30 : 36
};
$WH.g_convertScalingFactor = function(b, c, e, f, g) {
	var h = $WH.g_convertScalingFactor.SV, j = $WH.g_convertScalingFactor.SD;
	if (!h[b])
		return g_user.roles & U_GROUP_ADMIN
				&& alert("There are no item scaling values for level " + b), g
				? {}
				: 0;
	var k = {}, b = h[b], e = j[e];
	!e || !(f >= 0 && f <= 9)
			? k.v = b[c]
			: (k.n = $WH.g_statToJson[e[f]], k.s = e[f], k.v = Math.floor(b[c]
					* e[f + 10] / 1E4));
	return g ? k : k.v
};
$WH.g_convertScalingSpell = function(b, c) {
	var e = {}, f = $WH.g_convertScalingSpell.SV, g = $WH.g_convertScalingSpell.SD;
	if (!g[c])
		return g_user.roles
				& U_GROUP_ADMIN
				&& alert("There are no spell scaling distributions for dist "
						+ c), e;
	if (!f[b])
		return g_user.roles & U_GROUP_ADMIN
				&& alert("There are no spell scaling values for level " + b), e;
	g = g[c];
	if (g[3])
		g[3] == -1
				&& (g_user.roles
						& U_GROUP_ADMIN
						&& alert("This spell should use the generic scaling distribution 12"), g[3] = 12);
	else
		return g_user.roles & U_GROUP_ADMIN
				&& alert("This spell should not scale at all"), e;
	if (!f[b][g[3] - 1])
		return g_user.roles & U_GROUP_ADMIN
				&& alert("Unknown category for spell scaling " + g[3]), e;
	f = f[b][g[3] - 1];
	f *= (Math.min(b, g[14]) + g[13] * Math.max(0, b - g[14])) / b;
	e.cast = Math.min(g[1], g[1] > 0 && b > 1 ? g[0] + (b - 1) * (g[1] - g[0])
					/ (g[2] - 1) : g[0]);
	e.effects = {};
	for (var h = 0; h < 3; ++h) {
		var j = g[4 + h], k = g[7 + h], m = g[10 + h], l = e.effects[h + 1] = {};
		l.avg = j * f * (g[1] > 0 ? e.cast / g[1] : 1);
		l.min = Math.round(l.avg) - Math.floor(l.avg * k / 2);
		l.max = Math.round(l.avg) + Math.floor(l.avg * k / 2);
		l.pts = Math.round(m * f);
		l.avg = Math.max(Math.ceil(j), Math.round(l.avg))
	}
	e.cast = Math.round(e.cast / 10) / 100;
	return e
};
$WH.g_getDataSource = function() {
	if ($WH.isset("g_pageInfo"))
		switch (g_pageInfo.type) {
			case 3 :
				if ($WH.isset("g_items"))
					return g_items;
			case 6 :
				if ($WH.isset("g_spells"))
					return g_spells
		}
	return []
};
$WH.g_setJsonItemLevel = function(b, c) {
	if (b.scadist && b.scaflags) {
		b.bonuses = b.bonuses || {};
		var e = b.scaflags & 255, f = b.scaflags >> 8 & 255, g = (b.scaflags & 65536) != 0, h = (b.scaflags & 131072) != 0, j = (b.scaflags & 262144) != 0, k;
		switch (e) {
			case 5 :
			case 1 :
			case 7 :
			case 17 :
				k = 7;
				break;
			case 3 :
			case 12 :
				k = 8;
				break;
			case 16 :
			case 11 :
				k = 9;
				break;
			case 15 :
				k = 10;
				break;
			case 23 :
			case 21 :
			case 22 :
			case 13 :
				k = 11;
				break;
			default :
				k = -1
		}
		if (k >= 0)
			for (var m = 0; m < 10; ++m) {
				var l = $WH.g_convertScalingFactor(c, k, b.scadist, m, 1);
				if (l.n)
					b[l.n] = l.v;
				b.bonuses[l.s] = l.v
			}
		if (j)
			b.splpwr = b.bonuses[45] = $WH.g_convertScalingFactor(c, 6);
		if (g)
			switch (e) {
				case 3 :
					b.armor = $WH.g_convertScalingFactor(c, 11 + f);
					break;
				case 5 :
					b.armor = $WH.g_convertScalingFactor(c, 15 + f);
					break;
				case 1 :
					b.armor = $WH.g_convertScalingFactor(c, 19 + f);
					break;
				case 7 :
					b.armor = $WH.g_convertScalingFactor(c, 23 + f);
					break;
				case 16 :
					b.armor = $WH.g_convertScalingFactor(c, 28);
					break;
				default :
					b.armor = 0
			}
		if (h) {
			g = b.mledps ? "mle" : "rgd";
			switch (e) {
				case 23 :
				case 21 :
				case 22 :
				case 13 :
					b.dps = b[g + "dps"] = $WH.g_convertScalingFactor(c, j
									? 2
									: 0);
					e = 0.3;
					break;
				case 17 :
					b.dps = b[g + "dps"] = $WH.g_convertScalingFactor(c, j
									? 3
									: 1);
					e = 0.2;
					break;
				case 15 :
					b.dps = b[g + "dps"] = $WH.g_convertScalingFactor(c,
							f == 19 ? 5 : 4);
					e = 0.3;
					break;
				default :
					e = b.dps = b[g + "dps"] = 0
			}
			b.dmgmin = b[g + "dmgmin"] = Math.floor(b.dps * b.speed * (1 - e));
			b.dmgmax = b[g + "dmgmax"] = Math.floor(b.dps * b.speed * (1 + e))
		}
		if (b.gearscore != null) {
			if (b._gearscore == null)
				b._gearscore = b.gearscore;
			e = Math.min(85, c + 1);
			n = e >= 70 ? (e - 70) * 9.5 + 105 : e >= 60
					? (e - 60) * 4.5 + 60
					: e + 5;
			b.gearscore = b._gearscore * n / 1.8
		}
	}
};
$WH.g_setJsonSpellLevel = function(b, c) {
	b.scadist && $WH.cO(b, $WH.g_convertScalingSpell(c, b.scadist))
};
$WH.g_getJsonReforge = function(b, c, e) {
	var e = {
		amount : 0,
		s1 : $WH.g_statToJson[$WH.g_individualToGlobalStat[c] || c],
		s2 : $WH.g_statToJson[$WH.g_individualToGlobalStat[e] || e]
	}, f;
	for (f in b)
		if ($WH.g_jsonToStat[f] == c
				|| $WH.g_individualToGlobalStat[$WH.g_jsonToStat[f]] == c) {
			e.amount = Math.floor(b[f] * 0.4);
			break
		}
	return e
};
$WH.g_setTooltipLevel = function(b, c, e) {
	var f = typeof b;
	if (f == "number") {
		var g = $WH.g_getDataSource();
		if (g[b] && g[b][(e ? "buff_" : "tooltip_") + Locale.getName()])
			b = g[b][(e ? "buff_" : "tooltip_") + Locale.getName()];
		else
			return b
	} else if (f != "string")
		return b;
	f = b.match(/<\!--\?([0-9:]*)--\>/);
	if (!f)
		return b;
	f = f[1].split(":");
	c = Math.min(parseInt(f[2]), Math.max(parseInt(f[1]), c));
	if (e = parseInt(f[4]) || 0)
		if (b.match(/<\!--pts[0-9](:[0-9])?--\>/g)) {
			if (m = {
				scadist : e
			}, $WH.g_setJsonSpellLevel(m, c), b = b.replace(
					/<\!--cast--\>\d+\.\d+/, "<\!--cast--\>" + m.cast), m.effects)
				for (var h = 1; h < 4; ++h)
					var j = m.effects[h], b = b.replace(RegExp("<\!--pts" + h
											+ "(:0)?--\>(.+?)<", "g"),
							"<\!--pts"
									+ h
									+ "$1--\>"
									+ (j.min == j.max ? j.avg : j.min + " to "
											+ j.max) + "<"), b = b.replace(
							RegExp("<\!--pts" + h + ":1--\>(.+?)<", "g"),
							"<\!--pts" + h + ":1--\>" + j.min + "<"), b = b
							.replace(RegExp("<\!--pts" + h + ":2--\>(.+?)<",
											"g"), "<\!--pts" + h + ":2--\>"
											+ j.max + "<"), b = b
							.replace(RegExp("<\!--pts" + h
													+ ":3:(\\d+)--\>(.+?)<",
											"g"), function(b, c) {
										return "<\!--pts" + h + ":3:" + c
												+ "--\>" + j.avg * c + "<"
									}), b = b.replace(RegExp("<\!--pts" + h
											+ ":4--\>(.+?)<", "g"), "<\!--pts"
									+ h + ":4--\>" + j.pts + "<")
		} else {
			var g = parseInt(f[5]) || 0, k = b.match(/<\!--spd--\>(\d\.\d+)/);
			k && (k = parseFloat(k[1]) || 0);
			var m = {
				scadist : e,
				scaflags : g,
				speed : k
			};
			$WH.g_setJsonItemLevel(m, c);
			b = b.replace(/(<\!--asc(\d+)--\>)([^<]+)/, function(b, e, g) {
						f = g;
						c < 40 && (g == 3 || g == 4) && --f;
						return e + g_itemset_types[f]
					});
			b = b.replace(/(<\!--dmg--\>)\d+(\D+)\d+/, function(b, c, e) {
						return c + m.dmgmin + e + m.dmgmax
					});
			b = b.replace(/(<\!--dps--\>\D*?)(\d+\.\d)/, function(b, c) {
						return c + m.dps.toFixed(1)
					});
			b = b.replace(/(<\!--amr--\>)\d+/, function(b, c) {
						return c + m.armor
					});
			b = b
					.replace(
							/<span><\!--stat(\d+)--\>[-+]\d+(\D*?)<\/span>(<\!--e--\>)?(<\!--ps--\>)?(<br?\/?>)?/gi,
							function(b, c, e, f, g, h) {
								var j = m.bonuses[c];
								j
										? (j = (j > 0 ? "+" : "-") + j, b = "", h = h
												? "<br />"
												: "")
										: (j = "+0", b = ' style="display: none"', h = h
												? "<\!--br--\>"
												: "");
								return "<span" + b + "><\!--stat" + c + "--\>"
										+ j + e + "</span>" + (f || "")
										+ (g || "") + h
							});
			b = b
					.replace(
							/<span class="q2">(.*?)<\!--rtg(\d+)--\>\d+(.*?)<\/span>(<br\/>)?/gi,
							function(b, c, e, f, g, h, j) {
								(g = m.bonuses[$WH.g_individualToGlobalStat[e]
										|| e])
										? (b = "", j = j ? "<br />" : "")
										: (b = ' style="display: none"', j = j
												? "<\!--br--\>"
												: "");
								return '<span class="q2"' + b + ">" + c
										+ "<\!--rtg" + e + "--\>" + g + f
										+ "</span>" + j
							})
		}
	b = b.replace(/(<\!--rtg%(\d+)--\>)([\.0-9]+)/g, function(e, g, h) {
				f = b.match(RegExp("<\!--rtg" + h + "--\>(\\d+)"));
				if (!f)
					return e;
				return g
						+ Math.round($WH.g_convertRatingToPercent(c, h, f[1])
								* 100) / 100
			});
	b = b.replace(/(<\!--\?\d+:\d+:\d+:)\d+/, "$1" + c);
	return b = b.replace(/<\!--lvl--\>\d+/g, "<\!--lvl--\>" + c)
};
$WH.g_setTooltipSpells = function(b, c, e, f) {
	var g = {}, h;
	c == null && (c = []);
	f == null && (f = {});
	for (var j = 0; j < c.length; ++j)
		g[c[j]] = 1;
	if (h = b.match(RegExp("<\!--sp([0-9]+):[01]--\>.+?<\!--sp\\1--\>", "g")))
		for (j = 0; j < h.length; ++j) {
			var k = h[j].match("<\!--sp([0-9]+):[01]--\>.+?<\!--sp\\1--\>")[1];
			g[k] |= 0;
			f[k] == null && (f[k] = -1);
			f[k]++;
			if (!(e[k] == null || e[k][f[k]] == null || e[k][f[k]][g[k]] == null))
				var m = e[k][f[k]][g[k]], m = m
						.match("<\!--sp([0-9]+):[01]--\>.+?<\!--sp\\1--\>")
						? $WH.g_setTooltipSpells(m, c, e, f)
						: '<a href="' + link_178db("spell", k) + '">' + m
								+ "</a>", b = b.replace(h[j], "<\!--sp" + k
								+ ":" + g[k] + "--\>" + m + "<\!--sp" + k
								+ "--\>")
		}
	return b
};
$WH.g_enhanceTooltip = function(b, c, e, f, g, h) {
	var j = typeof b;
	if (j == "number") {
		var j = $WH.g_getDataSource(), k = b;
		if (j[k] && j[k][(g ? "buff_" : "tooltip_") + Locale.getName()]) {
			if (b = j[k][(g ? "buff_" : "tooltip_") + Locale.getName()], j[k][(g
					? "buff"
					: "")
					+ "spells_" + Locale.getName()])
				b = $WH.g_setTooltipSpells(b, h, j[k][(g ? "buff" : "")
								+ "spells_" + Locale.getName()])
		} else
			return b
	} else if (j != "string")
		return b;
	e
			&& (e = $WH.g_getGets(), e.lvl
					&& (b = $WH.g_setTooltipLevel(b, e.lvl, g)));
	c
			&& (b = b
					.replace(
							/<span class="q2"><\!--addamr(\d+)--\><span>.*?<\/span><\/span>/i,
							function(b, c) {
								return '<span class="q2 tip" onmouseover="$WH.Tooltip.showAtCursor(event, $WH.sprintf(LANG.tooltip_armorbonus, '
										+ c
										+ '), 0, 0, \'q\')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()">'
										+ b + "</span>"
							}), b = b.replace(
					/\(([^\)]*?<\!--lvl--\>[^\(]*?)\)/gi, function(b, c) {
						return '(<a href="javascript:;" onmousedown="return false" class="tip" style="color: white; cursor: pointer" onclick="$WH.g_staticTooltipLevelClick(this, null, 0)" onmouseover="$WH.Tooltip.showAtCursor(event, \'<span class=\\\'q2\\\'>\' + LANG.tooltip_changelevel + \'</span>\')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()">'
								+ c + "</a>)"
					}));
	if (f && Slider)
		if (g && g.slider)
			g.bufftip = this;
		else if ((j = b.match(/<\!--\?(\d+):(\d+):(\d+):(\d+)/))
				&& j[2] != j[3])
			this.slider = Slider.init(f, {
						minValue : parseInt(j[2]),
						maxValue : parseInt(j[3]),
						onMove : $WH.g_tooltipSliderMove.bind(this)
					}), Slider.setValue(this.slider, parseInt(j[4])), this.slider.onmouseover = function(
					b) {
				$WH.Tooltip.showAtCursor(b, LANG.tooltip_changelevel2, 0, 0,
						"q2")
			}, this.slider.onmousemove = $WH.Tooltip.cursorUpdate, this.slider.onmouseout = $WH.Tooltip.hide;
	return b
};
$WH.g_staticTooltipLevelClick = function(b, c, e, f) {
	for (; b.className.indexOf("tooltip") == -1;)
		b = b.parentNode;
	var g = b.innerHTML;
	if (g = g.match(/<\!--\?(\d+):(\d+):(\d+):(\d+)/)) {
		var h = parseInt(g[1]), j = parseInt(g[2]), k = parseInt(g[3]), g = parseInt(g[4]);
		if (!(j >= k)
				&& (c
						|| (c = prompt($WH.sprintf(LANG.prompt_ratinglevel, j,
										k), g)), c = parseInt(c), !isNaN(c)
						&& !(c == g || c < j || c > k)))
			j = $WH.g_getDataSource(), g = $WH.g_setTooltipLevel(j[h][(f
							? "buff_"
							: "tooltip_")
							+ Locale.getName()], c, f), g = $WH
					.g_enhanceTooltip(g, !0), b.innerHTML = "<table><tr><td>"
					+ g
					+ '</td><th style="background-position: top right"></th></tr><tr><th style="background-position: bottom left"></th><th style="background-position: bottom right"></th></tr></table>', $WH.Tooltip
					.fixSafe(b, 1, 1), b.slider && !e
					&& Slider.setValue(b.slider, c)
	}
};
$WH.g_tooltipSliderMove = function(b, c, e) {
	$WH.g_staticTooltipLevelClick(this, e.value, 1);
	this.bufftip && $WH.g_staticTooltipLevelClick(this.bufftip, e.value, 1, 1);
	$WH.Tooltip.hide()
};
$WH.Tooltip = {
	create : function() {
	},
	getMultiPartHtml : function(b, c) {
		return "<table><tr><td>" + b + "</td></tr></table><table><tr><td>" + c
				+ "</td></tr></table>"
	},
	fix : function(b, c, e) {
		var f = $WH.gE(b, "table")[0], g = $WH.gE(f, "td")[0].childNodes;
		b.className = $WH.trim(b.className.replace("tooltip-slider", ""));
		if (g.length >= 2 && g[0].nodeName == "TABLE"
				&& g[1].nodeName == "TABLE") {
			g[0].style.whiteSpace = "nowrap";
			var h = parseInt(b.style.width);
			if (!b.slider || !h)
				h = g[1].offsetWidth > 300 ? Math.max(300, g[0].offsetWidth)
						+ 20 : Math.max(g[0].offsetWidth, g[1].offsetWidth)
						+ 20;
			h = Math.min(320, h);
			if (h > 20
					&& (b.style.width = h + "px", g[0].style.width = g[1].style.width = "100%", b.slider
							&& (Slider.setSize(b.slider, h - 6), b.className += " tooltip-slider"), !c
							&& b.offsetHeight > document.body.clientHeight))
				f.className = "shrink"
		}
		if (e)
			b.style.visibility = "visible"
	},
	fixSafe : function(b, c, e) {
		$WH.Tooltip.fix(b, c, e)
	},
	append : function(b, c) {
		var b = $WH.ge(b), e = $WH.Tooltip.create(c);
		$WH.ae(b, e);
		$WH.Tooltip.fixSafe(e, 1, 1)
	},
	prepare : function() {
		if (!$WH.Tooltip.tooltip) {
			var b = $WH.Tooltip.create();
			b.style.position = "absolute";
			b.style.left = b.style.top = "-2323px";
			$WH.ae(document.body, b);
			$WH.Tooltip.tooltip = b;
			$WH.Tooltip.tooltipTable = $WH.gE(b, "table")[0];
			$WH.Tooltip.tooltipTd = $WH.gE(b, "td")[0];
			b = $WH.Tooltip.create(null, !0);
			b.style.position = "absolute";
			b.style.left = b.style.top = "-2323px";
			$WH.ae(document.body, b);
			$WH.Tooltip.tooltip2 = b;
			$WH.Tooltip.tooltipTable2 = $WH.gE(b, "table")[0];
			$WH.Tooltip.tooltipTd2 = $WH.gE(b, "td")[0]
		}
	},
	set : function(b, c) {
		var e = $WH.Tooltip.tooltip;
		e.style.width = "550px";
		e.style.left = "-2323px";
		e.style.top = "-2323px";
		b.nodeName
				? ($WH.ee($WH.Tooltip.tooltipTd), $WH.ae($WH.Tooltip.tooltipTd,
						b))
				: $WH.Tooltip.tooltipTd.innerHTML = b;
		e.style.display = "";
		$WH.Tooltip.fix(e, 0, 0);
		c
				? ($WH.Tooltip.showSecondary = !0, e = $WH.Tooltip.tooltip2, e.style.width = "550px", e.style.left = "-2323px", e.style.top = "-2323px", c.nodeName
						? ($WH.ee($WH.Tooltip.tooltipTd2), $WH.ae(
								$WH.Tooltip.tooltipTd2, c))
						: $WH.Tooltip.tooltipTd.innerHTML = c, e.style.display = "", $WH.Tooltip
						.fix(e, 0, 0))
				: $WH.Tooltip.showSecondary = !1
	},
	moveTests : [[null, null], [null, !1], [!1, null], [!1, !1]],
	move : function(b, c, e, f, g, h) {
		if ($WH.Tooltip.tooltipTable) {
			var j = $WH.Tooltip.tooltip, k = $WH.Tooltip.tooltipTable.offsetWidth, m = $WH.Tooltip.tooltip2, l = $WH.Tooltip.showSecondary
					? $WH.Tooltip.tooltipTable2.offsetWidth
					: 0, o;
			j.style.width = k + "px";
			m.style.width = l + "px";
			for (var q, l = 0, v = $WH.Tooltip.moveTests.length; l < v; ++l)
				if (o = $WH.Tooltip.moveTests[l], o = $WH.Tooltip.moveTest(b,
						c, e, f, g, h, o[0], o[1]), $WH.isset("Ads")
						&& !Ads.intersect(o)) {
					q = !0;
					break
				} else if (!$WH.isset("Ads"))
					break;
			$WH.isset("Ads") && !q && Ads.intersect(o, !0);
			j.style.left = o.l + "px";
			j.style.top = o.t + "px";
			j.style.visibility = "visible";
			if ($WH.Tooltip.showSecondary)
				m.style.left = o.l + k + "px", m.style.top = o.t + "px", m.style.visibility = "visible"
		}
	},
	moveTest : function(b, c, e, f, g, h, j, k) {
		var m = b, l = c, o = $WH.Tooltip.tooltipTable.offsetWidth, q = $WH.Tooltip.tooltipTable.offsetHeight, v = $WH.Tooltip.showSecondary
				? $WH.Tooltip.tooltipTable2.offsetWidth
				: 0, p = $WH.Tooltip.showSecondary
				? $WH.Tooltip.tooltipTable2.offsetHeight
				: 0, r = $WH.g_getWindowSize(), t = $WH.g_getScroll(), z = t.x, t = t.y, u = z
				+ r.w, r = t + r.h;
		j == null && (j = b + e + o + v <= u);
		k == null && (k = c - Math.max(q, p) >= t);
		j ? b += e + g : b = Math.max(b - (o + v), z) - g;
		k ? c -= Math.max(q, p) + h : c += f + h;
		b < z ? b = z : b + o + v > u && (b = u - (o + v));
		c < t ? c = t : c + Math.max(q, p) > r
				&& (c = Math.max(t, r - Math.max(q, p)));
		$WH.Tooltip.iconVisible && m >= b - 48 && m <= b && l >= c - 4
				&& l <= c + 48 && (c -= 48 - (l - c));
		return $WH.g_createRect(b, c, o, q)
	},
	show : function(b, c, e, f, g, h) {
		if (!$WH.Tooltip.disabled) {
			if (!e || e < 1)
				e = 1;
			if (!f || f < 1)
				f = 1;
			g && (c = '<span class="' + g + '">' + c + "</span>");
			g = $WH.ac(b);
			$WH.Tooltip.prepare();
			$WH.Tooltip.set(c, h);
			$WH.Tooltip.move(g.x, g.y, b.offsetWidth, b.offsetHeight, e, f)
		}
	},
	showAtCursor : function(b, c, e, f, g, h) {
		if (!$WH.Tooltip.disabled) {
			if (!e || e < 10)
				e = 10;
			if (!f || f < 10)
				f = 10;
			g
					&& (c = '<span class="' + g + '">' + c + "</span>", h
							&& (h = '<span class="' + g + '">' + h + "</span>"));
			b = $WH.$E(b);
			b = $WH.g_getCursorPos(b);
			$WH.Tooltip.prepare();
			$WH.Tooltip.set(c, h);
			$WH.Tooltip.move(b.x, b.y, 0, 0, e, f)
		}
	},
	showAtXY : function(b, c, e, f, g, h) {
		$WH.Tooltip.disabled
				|| ($WH.Tooltip.prepare(), $WH.Tooltip.set(b, h), $WH.Tooltip
						.move(c, e, 0, 0, f, g))
	},
	cursorUpdate : function(b, c, e) {
		if (!$WH.Tooltip.disabled && $WH.Tooltip.tooltip) {
			b = $WH.$E(b);
			if (!c || c < 10)
				c = 10;
			if (!e || e < 10)
				e = 10;
			b = $WH.g_getCursorPos(b);
			$WH.Tooltip.move(b.x, b.y, 0, 0, c, e)
		}
	},
	hide : function() {
		if ($WH.Tooltip.tooltip)
			$WH.Tooltip.tooltip.style.display = "none", $WH.Tooltip.tooltip.visibility = "hidden", $WH.Tooltip.tooltipTable.className = "", $WH.Tooltip
					.setIcon(null), $WH.isset("Ads") && Ads.restoreHidden();
		if ($WH.Tooltip.tooltip2)
			$WH.Tooltip.tooltip2.style.display = "none", $WH.Tooltip.tooltip2.visibility = "hidden", $WH.Tooltip.tooltipTable2.className = ""
	},
	setIcon : function(b) {
		$WH.Tooltip.prepare();
		b
				? ($WH.Tooltip.icon.style.backgroundImage = "url("
						+ icon_178db(b.toLowerCase(), "medium") + ")", $WH.Tooltip.icon.style.visibility = "visible")
				: ($WH.Tooltip.icon.style.backgroundImage = "none", $WH.Tooltip.icon.style.visibility = "hidden");
		$WH.Tooltip.iconVisible = b ? 1 : 0
	}
};
$WH.isset("$WowheadPower") && $WowheadPower.init();
$WH.g_getProfileIcon = function(b, c, e, f, g, h) {
	var j = {
		10 : {
			6 : 1,
			3 : 1,
			8 : 1,
			2 : 1,
			5 : 1,
			4 : 1,
			9 : 1
		},
		11 : {
			6 : 1,
			3 : 1,
			8 : 1,
			2 : 1,
			5 : 1,
			7 : 1,
			1 : 1
		},
		3 : {
			6 : 1,
			3 : 1,
			2 : 1,
			5 : 1,
			4 : 1,
			1 : 1
		},
		7 : {
			6 : 1,
			8 : 1,
			4 : 1,
			9 : 1,
			1 : 1
		},
		1 : {
			6 : 1,
			8 : 1,
			2 : 1,
			5 : 1,
			4 : 1,
			9 : 1,
			1 : 1
		},
		4 : {
			6 : 1,
			11 : 1,
			3 : 1,
			5 : 1,
			4 : 1,
			1 : 1
		},
		2 : {
			6 : 1,
			3 : 1,
			4 : 1,
			7 : 1,
			9 : 1,
			1 : 1
		},
		6 : {
			6 : 1,
			11 : 1,
			3 : 1,
			7 : 1,
			1 : 1
		},
		8 : {
			6 : 1,
			3 : 1,
			8 : 1,
			5 : 1,
			4 : 1,
			7 : 1,
			1 : 1
		},
		5 : {
			6 : 1,
			8 : 1,
			5 : 1,
			4 : 1,
			9 : 1,
			1 : 1
		}
	};
	if (g)
		return isNaN(g) ? g : "/profile=avatar" + (h ? "&size=" + h : "")
				+ "&id=" + g + (h == "tiny" ? ".gif" : ".jpg");
	if (!g_file_races[b] || !g_file_classes[c] || !g_file_genders[e] || !j[b]
			|| !j[b][c] || c == 6 && f < 55)
		return "inv_misc_questionmark";
	return "chr_" + g_file_races[b] + "_" + g_file_genders[e] + "_"
			+ g_file_classes[c] + "0"
			+ (f > 59 ? Math.floor((f - 60) / 10) + 2 : 1)
};
$WH.Tooltip.showAtCursor = function(b, c, e, f, g) {
	g && (c = '<span class="' + g + '">' + c + "</span>");
	b = $WH.$E(b) || "body";
	_tip.show(c, b)
};
$WH.Tooltip.cursorUpdate = function() {
};
$WH.Tooltip.setIcon = function() {
	_tip.init();
	var b = $("#global-tooltip span.icon-frame");
	b.length
			|| (b = $("<span />").addClass("icon-frame").addClass("frame-56"), b
					.appendTo($("#global-tooltip div.tooltip")));
	b.css("background-image",
			"http://db1.178.com/wow/icons/l/spell_holy_auraoflight.jpg")
};
$WH.Tooltip.hide = function() {
	_tip.hide()
};
function g_enableScroll(b) {
	b ? ($WH.dE(document, "mousewheel", g_enableScroll.F), $WH.dE(window,
			"DOMMouseScroll", g_enableScroll.F)) : ($WH.aE(document,
			"mousewheel", g_enableScroll.F), $WH.aE(window, "DOMMouseScroll",
			g_enableScroll.F))
}
g_enableScroll.F = function(b) {
	b.stopPropagation && b.stopPropagation();
	b.preventDefault && b.preventDefault();
	b.returnValue = !1;
	b.cancelBubble = !0;
	return !1
};
function g_onAfterTyping(b, c, e) {
	var f;
	b.onkeyup = function() {
		f && (clearTimeout(f), f = null);
		f = setTimeout(c, e)
	}
}
function g_onClick(b, c) {
	function e(b) {
		if (f) {
			if (f != b)
				return
		} else
			f = b;
		c(!0)
	}
	var f = 0;
	b.oncontextmenu = function() {
		e(1);
		return !1
	};
	b.onmouseup = function(b) {
		b = $WH.$E(b);
		b._button == 3 || b.shiftKey || b.ctrlKey ? e(2) : b._button == 1
				&& c(!1);
		return !1
	}
}
function g_isLeftClick(b) {
	return (b = $WH.$E(b)) && b._button == 1
}
function g_preventEmptyFormSubmission() {
	if (!$.trim(this.elements[0].value))
		return !1
}
function g_sortIdArray(b, c, e) {
	b.sort(e ? function(b, g) {
		return $WH.strcmp(c[b][e], c[g][e])
	} : function(b, e) {
		return $WH.strcmp(c[b], c[e])
	})
}
function g_sortJsonArray(b, c, e, f) {
	var g = [], h;
	for (h in b)
		c[h] && (f == null || f(c[h])) && g.push(h);
	e != null ? g.sort(e) : g_sortIdArray(g, c);
	return g
}
function g_addTooltip(b, c, e) {
	!e && c.indexOf("<table>") == -1 && (e = "q");
	b.onmouseover = function() {
		_tip.show(c, this, !0)
	};
	b.onmousemove = $WH.Tooltip.cursorUpdate;
	b.onmouseout = $WH.Tooltip.hide
}
function g_pickerWheel(b) {
	b = $WH.$E(b);
	b._wheelDelta < 0 ? this.scrollTop += 27 : this.scrollTop -= 27
}
function g_toggleDisplay(b) {
	b = $(b);
	b.toggle();
	if (b.is(":visible"))
		return !0;
	return !1
}
var g_file_classes = {
	6 : "deathknight",
	11 : "druid",
	3 : "hunter",
	8 : "mage",
	2 : "paladin",
	5 : "priest",
	4 : "rogue",
	7 : "shaman",
	9 : "warlock",
	1 : "warrior"
}, g_staticUrl = "http://static.wowhead.com", Icon = {
	sizes : ["small", "medium", "large", "blizzard"],
	sizes2 : [18, 36, 56, 64],
	premiumOffsets : [[-56, -36], [-56, 0], [0, 0], [0, 0]],
	create : function(b, c, e, f, g, h) {
		var e = $WH.ce("div"), j = $WH.ce("ins"), k = $WH.ce("del");
		c == null && (c = 1);
		e.className = "icon" + Icon.sizes[c];
		$WH.ae(e, j);
		$WH.ae(e, k);
		Icon.setTexture(e, c, b);
		if (f) {
			b = $WH.ce("a");
			b.href = f;
			if (f == "javascript:;")
				b.target = "_self";
			else if (f.indexOf("wowhead.com") == -1
					&& f.substr(0, 5) == "http:")
				b.target = "_blank";
			$WH.ae(e, b)
		} else if (b
				&& e.firstChild.style.backgroundImage.indexOf("/avatars/") == -1)
			e.onclick = Icon.onClick, b = $WH.ce("a"), b.href = "javascript:;", $WH
					.ae(e, b);
		Icon.setNumQty(e, g, h);
		return e
	},
	createUser : function(b, c, e, f, g) {
		b == 2 && (c = g_staticUrl + "/uploads/avatars/" + c + ".jpg");
		c = Icon.create(c, e, null, f);
		g && (c.className += " " + c.className + "-premium");
		b == 2
				&& Icon.moveTexture(c, e, Icon.premiumOffsets[e][0],
						Icon.premiumOffsets[e][1], !0);
		return c
	},
	setTexture : function(b, c, e) {
		if (e)
			b.firstChild.style.backgroundImage = e.indexOf("/") != -1 ? "url("
					+ e + ")" : "url("
					+ icon_178db(e.toLowerCase(), Icon.sizes[c]) + ")", Icon
					.moveTexture(b, c, 0, 0)
	},
	moveTexture : function(b, c, e, f, g) {
		b = b.firstChild.style;
		if (e || f)
			b.backgroundPosition = g ? e + "px " + f + "px" : -e
					* Icon.sizes2[c] + "px " + -f * Icon.sizes2[c] + "px";
		else if (b.backgroundPosition)
			b.backgroundPosition = ""
	},
	setNumQty : function(b, c, e) {
		for (var f = $WH.gE(b, "span"), g = 0, h = f.length; g < h; ++g)
			f[g] && $WH.de(f[g]);
		if (c != null && (c > 1 && c < 2147483647 || c.length))
			f = g_createGlow(c, $WH.isset("g_thottbot") && g_thottbot
							? "w"
							: "q1"), f.style.right = "0", f.style.bottom = "0", f.style.position = "absolute", $WH
					.ae(b, f);
		if (e != null && e > 0)
			f = g_createGlow("(" + e + ")", $WH.isset("g_thottbot")
							&& g_thottbot ? "w" : "q"), f.style.left = "0", f.style.top = "0", f.style.position = "absolute", $WH
					.ae(b, f)
	},
	getLink : function(b) {
		return $WH.gE(b, "a")[0]
	},
	showIconName : function(b) {
		if (b.firstChild
				&& (b = b.firstChild.style, b.backgroundImage.length
						&& b.backgroundImage
								.indexOf("http://static.wowhead.com") >= 4)) {
			var c = b.backgroundImage.lastIndexOf("/"), e = b.backgroundImage
					.indexOf(".jpg");
			c != -1 && e != -1
					&& Icon.displayIcon(b.backgroundImage.substring(c + 1, e))
		}
	},
	onClick : function() {
		Icon.showIconName(this)
	},
	displayIcon : function(b) {
		if (!Dialog.templates.icondisplay) {
			var c = 364;
			switch (Locale.getId()) {
				case LOCALE_ESES :
					c = 380;
					break;
				case LOCALE_RURU :
					c = 384
			}
			Dialog.templates.icondisplay = {
				title : LANG.icon,
				width : c,
				buttons : ["original", "close"],
				fields : [{
							id : "icon",
							label : LANG.dialog_imagename,
							required : 1,
							type : "text",
							labelAlign : "left",
							compute : function(b, c, g, h) {
								g = $WH.ce("div");
								h.style.width = "300px";
								g.style.position = "relative";
								g.style.cssFloat = "left";
								g.style.paddingRight = "6px";
								b.style.width = "200px";
								var j = this.iconDiv = $WH.ce("div");
								j.style.position = "absolute";
								j.style.top = "-12px";
								j.style.right = "-70px";
								j.update = function() {
									setTimeout(function() {
												b.focus();
												b.select()
											}, 10);
									$WH.ee(j);
									$WH.ae(j, Icon.create(b.value, 2))
								};
								$WH.ae(j, Icon.create(c, 2));
								$WH.ae(g, j);
								$WH.ae(g, b);
								$WH.ae(h, g)
							}
						}, {
							id : "location",
							label : " ",
							required : 1,
							type : "caption",
							compute : function(b, c, g, h) {
								$WH.ee(h);
								h.style.padding = "3px 3px 0 3px";
								h.style.lineHeight = "17px";
								h.style.whiteSpace = "normal";
								b = $WH.ce("div");
								b.style.position = "relative";
								b.style.width = "250px";
								c = $WH.ce("span");
								g = LANG.dialog_seeallusingicon;
								g = g.replace("$1",
										'<a href="/items?filter=cr=142;crs=0;crv='
												+ this.data.icon + '">'
												+ LANG.types[3][3] + "</a>");
								g = g.replace("$2",
										'<a href="/spells?filter=cr=15;crs=0;crv='
												+ this.data.icon + '">'
												+ LANG.types[6][3] + "</a>");
								g = g.replace("$3",
										'<a href="/achievements?filter=cr=10;crs=0;crv='
												+ this.data.icon + '">'
												+ LANG.types[10][3] + "</a>");
								c.innerHTML = g;
								$WH.ae(b, c);
								$WH.ae(h, b)
							}
						}],
				onInit : function(b) {
					this.updateIcon = this.template.updateIcon.bind(this, b)
				},
				onShow : function() {
					this.updateIcon();
					this.oldHash = location.hash
							&& location.hash.indexOf("#icon") == -1
							? location.hash
							: "";
					var b = "#icon";
					$WH.isset("g_pageInfo") && g_pageInfo.type
							&& $WH.in_array([3, 6, 10], g_pageInfo.type) == -1
							|| (b += ":" + this.data.icon);
					location.hash = b
				},
				onHide : function() {
					location.hash = this.oldHash ? this.oldHash : "#."
				},
				updateIcon : function() {
					this.iconDiv.update()
				},
				onSubmit : function(b, c, g) {
					if (g == "original")
						return window.open(
								"http://static.wowhead.com/images/wow/icons/large/"
										+ c.icon.toLowerCase() + ".jpg",
								"_blank").focus(), !1;
					return !0
				}
			}
		}
		if (!Icon.icDialog)
			Icon.icDialog = new Dialog;
		Icon.icDialog.show("icondisplay", {
					data : {
						icon : b
					}
				})
	},
	checkPound : function() {
		if (location.hash && location.hash.indexOf("#icon") == 0) {
			var b = location.hash.split(":"), c = !1;
			if (b.length == 2)
				c = b[1];
			else if (b.length == 1 && $WH.isset("g_pageInfo"))
				switch (g_pageInfo.type) {
					case 3 :
						c = g_items[g_pageInfo.typeId].icon.toLowerCase();
						break;
					case 6 :
						c = g_spells[g_pageInfo.typeId].icon.toLowerCase();
						break;
					case 10 :
						c = g_achievements[g_pageInfo.typeId].icon
								.toLowerCase()
				}
			c && Icon.displayIcon(c)
		}
	}
}, PoundChecker = new function() {
	var b = null, c = null, e = 1E3, f = function() {
		c ? location.hash && c() : PoundChecker.stop()
	};
	this.start = function(g, h) {
		c ? $WH.isset("g_dev")
				&& alert("Multiple pound checkers are bad, mmkay?") : (c = g, h
				&& (e = h), b = setInterval(f, e))
	};
	this.stop = function() {
		clearInterval(b);
		b = c = null;
		e = 1E3
	};
	this.pause = function() {
		clearInterval(b)
	};
	this.resume = function() {
		c && (b = setInterval(c, e))
	}
}, Lightbox = new function() {
	function b(b) {
		b = $WH.$E(b);
		switch (b.keyCode) {
			case 27 :
				e()
		}
	}
	function c(b) {
		if (b != 1234 && k.onResize)
			k.onResize()
	}
	function e() {
		if (m) {
			$WH.dE($("#global-blackout")[0], "click", e);
			$WH.dE(document, "keydown", b);
			$WH.dE(window, "resize", c);
			if (k.onHide)
				k.onHide();
			_ele.blackout("hide");
			g.style.display = "none";
			PoundChecker.resume();
			g_enableScroll(!0)
		}
	}
	function f() {
		_ele.blackout(!0);
		g.style.display = j[l].style.display = "";
		Lightbox.setSize(h.offsetWidth, h.offsetHeight, 1)
	}
	var g, h, j = {}, k = {}, m, l;
	this.setSize = function(b, c, e) {
		h.style.visibility = "hidden";
		if (!e && (h.style.width = b + "px", c))
			h.style.height = c + "px";
		h.style.left = -parseInt(b / 2) + "px";
		if (c)
			h.style.top = (bIE6 ? document.documentElement.scrollTop : 0)
					- parseInt(c / 2) + "px";
		h.style.visibility = "visible"
	};
	this.show = function(o, q, v) {
		k = q || {};
		PoundChecker.pause();
		if (!m)
			m = 1, q = document.body, _ele.blackout(!0), g = $WH.ce("div"), g.className = "lightbox-outer", h = $WH
					.ce("div"), h.className = "lightbox-inner", g.style.display = "none", $WH
					.ae(g, h), $WH.ae(q, g);
		$WH.aE($("#global-blackout")[0], "click", e);
		$WH.aE(document, "keydown", b);
		$WH.aE(window, "resize", c);
		if (l != o && j[l] != null)
			j[l].style.display = "none";
		l = o;
		var q = 0, p;
		j[o] == null
				? (q = 1, p = $WH.ce("div"), $WH.ae(h, p), j[o] = p)
				: p = j[o];
		if (k.onShow)
			k.onShow(p, q, v);
		c(1234);
		f();
		g_enableScroll(!1)
	};
	this.reveal = function() {
		f()
	};
	this.hide = function() {
		e()
	};
	this.isVisible = function() {
	}
}, g_listviews = {};
function Listview(b) {
	$WH.cO(this, b);
	if (this.id) {
		b = (this.tabs ? "tab-" : "lv-") + this.id;
		if (this.parent) {
			var c = $WH.ce("div");
			c.id = b;
			$WH.ae($WH.ge(this.parent), c);
			this.container = c
		} else
			this.container = $WH.ge(b);
		$WH.g_getGets();
		if (this.template && Listview.templates[this.template]) {
			this.template = Listview.templates[this.template];
			g_listviews[this.id] = this;
			if (this.data == null)
				this.data = [];
			if (this.poundable == null)
				this.poundable = this.template.poundable != null
						? this.template.poundable
						: !0;
			if (this.searchable == null)
				this.searchable = this.template.searchable != null
						? this.template.searchable
						: !1;
			if (this.filtrable == null)
				this.filtrable = this.template.filtrable != null
						? this.template.filtrable
						: !1;
			if (this.sortable == null)
				this.sortable = this.template.sortable != null
						? this.template.sortable
						: !0;
			if (this.customPound == null)
				this.customPound = this.template.customPound != null
						? this.template.customPound
						: !1;
			if (this.data.length == 1)
				this.searchable = this.filtrable = !1;
			if (this.searchable && this.searchDelay == null)
				this.searchDelay = this.template.searchDelay != null
						? this.template.searchDelay
						: 333;
			if (this.clickable == null)
				this.clickable = this.template.clickable != null
						? this.template.clickable
						: !0;
			if (this.hideBands == null)
				this.hideBands = this.template.hideBands;
			if (this.hideNav == null)
				this.hideNav = this.template.hideNav;
			if (this.hideHeader == null)
				this.hideHeader = this.template.hideHeader;
			if (this.hideCount == null)
				this.hideCount = this.template.hideCount;
			if (this.computeDataFunc == null
					&& this.template.computeDataFunc != null)
				this.computeDataFunc = this.template.computeDataFunc;
			if (this.createCbControls == null
					&& this.template.createCbControls != null)
				this.createCbControls = this.template.createCbControls;
			if (this.template.onBeforeCreate != null)
				this.onBeforeCreate = this.onBeforeCreate == null
						? this.template.onBeforeCreate
						: [this.template.onBeforeCreate, this.onBeforeCreate];
			if (this.onAfterCreate == null
					&& this.template.onAfterCreate != null)
				this.onAfterCreate = this.template.onAfterCreate;
			if (this.onNoData == null && this.template.onNoData != null)
				this.onNoData = this.template.onNoData;
			if (this.createNote == null && this.template.createNote != null)
				this.createNote = this.template.createNote;
			if (this.customFilter == null && this.template.customFilter != null)
				this.customFilter = this.template.customFilter;
			if (this.onSearchSubmit == null
					&& this.template.onSearchSubmit != null)
				this.onSearchSubmit = this.template.onSearchSubmit;
			if (this.getItemLink == null && this.template.getItemLink != null)
				this.getItemLink = this.template.getItemLink;
			if (this.clip == null && this.template.clip != null)
				this.clip = this.template.clip;
			if (this.clip || this.template.compute || this.id == "topics"
					|| this.id == "recipes")
				this.debug = !1;
			if (this.mode == null)
				this.mode = this.template.mode;
			if (this.nItemsPerPage == null)
				this.nItemsPerPage = this.template.nItemsPerPage != null
						? this.template.nItemsPerPage
						: 50;
			this.nItemsPerPage |= 0;
			if (this.nItemsPerPage <= 0)
				this.nItemsPerPage = 0;
			this.nFilters = 0;
			this.resetRowVisibility();
			if (this.mode == Listview.MODE_TILED) {
				if (this.nItemsPerRow == null)
					b = this.template.nItemsPerRow, this.nItemsPerRow = b != null
							? b
							: 4;
				this.nItemsPerRow |= 0;
				if (this.nItemsPerRow <= 1)
					this.nItemsPerRow = 1
			} else if (this.mode == Listview.MODE_CALENDAR) {
				this.dates = [];
				this.nItemsPerRow = 7;
				this.nItemsPerPage = 1;
				this.nDaysPerMonth = [];
				this.startOnMonth = this.template.startOnMonth != null
						? this.template.startOnMonth
						: new Date;
				this.startOnMonth.setDate(1);
				this.startOnMonth.setHours(0, 0, 0, 0);
				if (this.nMonthsToDisplay == null)
					this.nMonthsToDisplay = this.template.nMonthsToDisplay != null
							? this.template.nMonthsToDisplay
							: 1;
				for (var c = this.startOnMonth.getFullYear(), e = this.startOnMonth
						.getMonth(), f = 0; f < this.nMonthsToDisplay; ++f) {
					this.nDaysPerMonth[f] = 32
							- (new Date(c, e + f, 32)).getDate();
					for (b = 1; b <= this.nDaysPerMonth[f]; ++b)
						this.dates.push({
									date : new Date(c, e + f, b)
								})
				}
				if (this.template.rowOffset != null)
					this.rowOffset = this.template.rowOffset
			} else
				this.nItemsPerRow = 1;
			this.columns = [];
			b = 0;
			for (c = this.template.columns.length; b < c; ++b)
				e = {}, $WH.cO(e, this.template.columns[b]), this.columns
						.push(e);
			if (this.extraCols != null) {
				b = 0;
				for (c = this.extraCols.length; b < c; ++b) {
					var g = null, f = this.extraCols[b];
					if (f.after || f.before)
						e = $WH.in_array(this.columns, f.after
										? f.after
										: f.before, function(b) {
									return b.id
								}), e != -1 && (g = f.after ? e + 1 : e);
					if (g == null)
						g = this.columns.length;
					f.id == "debug-id"
							? this.columns.splice(0, 0, f)
							: this.columns.splice(g, 0, f)
				}
			}
			this.visibility = [];
			var h = [], j = [];
			this.visibleCols != null
					&& $WH.array_walk(this.visibleCols, function(b) {
								h[b] = 1
							});
			this.hiddenCols != null
					&& $WH.array_walk(this.hiddenCols, function(b) {
								j[b] = 1
							});
			b = 0;
			for (c = this.columns.length; b < c; ++b)
				f = this.columns[b], (h[f.id] != null || !f.hidden
						&& j[f.id] == null)
						&& this.visibility.push(b);
			if (this.sort == null && this.template.sort)
				this.sort = this.template.sort.slice(0);
			if (this.sort != null) {
				g = this.sort;
				this.sort = [];
				b = 0;
				for (c = g.length; b < c; ++b)
					f = parseInt(g[b]), isNaN(f)
							? (f = 0, g[b].charAt(0) == "-"
									&& (f = 1, g[b] = g[b].substring(1)), e = $WH
									.in_array(this.columns, g[b], function(b) {
												return b.id
											}), e != -1
									&& (f
											? this.sort.push(-(e + 1))
											: this.sort.push(e + 1)))
							: this.sort.push(f)
			} else
				this.sort = [];
			if (this.debug) {
				this.columns.splice(0, 0, {
							id : "debug-id",
							compute : function(b, c) {
								b.id && $WH.ae(c, $WH.ct(b.id))
							},
							getVisibleText : function(b) {
								return b.id ? b.id : ""
							},
							getValue : function(b) {
								return b.id ? b.id : 0
							},
							sortFunc : function(b, c) {
								if (b.id == null)
									return -1;
								else if (c.id == null)
									return 1;
								return $WH.strcmp(b.id, c.id)
							},
							name : "ID",
							width : "5%",
							tooltip : "ID"
						});
				this.visibility.splice(0, 0, -1);
				b = 0;
				for (c = this.visibility.length; b < c; ++b)
					this.visibility[b] += 1;
				b = 0;
				for (c = this.sort.length; b < c; ++b)
					this.sort[b] < 0 ? this.sort[b] -= 1 : this.sort[b] += 1
			}
			this.tabs ? (this.tabIndex = this.tabs.add(this.getTabName(), {
						id : this.id,
						onLoad : this.initialize.bind(this)
					}), this.tabClick = Tabs.trackClick.bind(this.tabs,
					this.tabs.tabs[this.tabIndex])) : this.initialize()
		}
	}
}
Listview.MODE_DEFAULT = 0;
Listview.MODE_CHECKBOX = 1;
Listview.MODE_DIV = 2;
Listview.MODE_TILED = 3;
Listview.MODE_CALENDAR = 4;
Listview.prototype = {
	initialize : function() {
		if (this.data.length && this.computeDataFunc != null)
			for (var b = 0, c = this.data.length; b < c; ++b)
				this.computeDataFunc(this.data[b]);
		this.tabs ? (this.pounded = this.tabs.poundedTab == this.tabIndex)
				&& this.readPound() : this.readPound();
		this.applySort();
		var e;
		if (this.onBeforeCreate != null)
			if (typeof this.onBeforeCreate == "function")
				e = this.onBeforeCreate();
			else
				for (b = 0; b < this.onBeforeCreate.length; ++b)
					this.onBeforeCreate[b].bind(this)();
		this.noData = $WH.ce("div");
		this.noData.className = "listview-nodata text";
		if (this.mode == Listview.MODE_DIV)
			this.mainContainer = this.mainDiv = $WH.ce("div"), this.mainContainer.className = "listview-mode-div";
		else {
			this.mainContainer = this.table = $WH.ce("table");
			this.thead = $WH.ce("thead");
			this.tbody = $WH.ce("tbody");
			if (this.clickable)
				this.tbody.className = "clickable";
			if (this.mode == Listview.MODE_TILED
					|| this.mode == Listview.MODE_CALENDAR) {
				this.table.className = "listview-mode-"
						+ (this.mode == Listview.MODE_TILED
								? "tiled"
								: "calendar");
				for (var c = 100 / this.nItemsPerRow + "%", f = $WH
						.ce("colgroup"), g, b = 0; b < this.nItemsPerRow; ++b)
					g = $WH.ce("col"), g.style.width = c, $WH.ae(f, g);
				$WH.ae(this.mainContainer, f)
			} else
				this.table.className = "listview-mode-default", this
						.createHeader(), this.updateSortArrow();
			$WH.ae(this.table, this.thead);
			$WH.ae(this.table, this.tbody)
		}
		this.createBands();
		this.customFilter != null && this.updateFilters();
		this.updateNav();
		this.refreshRows();
		if (this.onAfterCreate != null)
			this.onAfterCreate(e)
	},
	createHeader : function() {
		var b = $WH.ce("tr");
		if (this.mode == Listview.MODE_CHECKBOX
				&& (!$WH.isset("g_thottbot") || !g_thottbot)) {
			var c = $WH.ce("th"), e = $WH.ce("div"), f = $WH.ce("a");
			c.style.width = "33px";
			f.href = "javascript:;";
			f.className = "listview-cb";
			$WH.ns(f);
			$WH.ae(f, $WH.ct(String.fromCharCode(160)));
			$WH.ae(e, f);
			$WH.ae(c, e);
			$WH.ae(b, c)
		}
		for (var g = 0, h = this.visibility.length; g < h; ++g) {
			var j = this.visibility[g], k = this.columns[j], c = $WH.ce("th"), e = $WH
					.ce("div"), f = $WH.ce("a");
			outerSpan = $WH.ce("span");
			innerSpan = $WH.ce("span");
			k.__th = c;
			if (this.filtrable && (k.filtrable == null || k.filtrable))
				f.onmouseup = Listview.headerClick.bind(this, k, j), f.onclick = f.oncontextmenu = $WH.rf;
			else if (this.sortable)
				f.href = "javascript:;", f.onclick = this.sortBy.bind(this, j
								+ 1);
			f.onclick
					? (f.onmouseover = Listview.headerOver.bind(this, f, k), f.onmouseout = $WH.Tooltip.hide, $WH
							.ns(f))
					: f.className = "static";
			if (k.width != null)
				c.style.width = k.width;
			if (k.align != null)
				c.style.textAlign = k.align;
			if (k.span != null)
				c.colSpan = k.span;
			$WH.ae(innerSpan, $WH.ct(k.name));
			$WH.ae(outerSpan, innerSpan);
			$WH.ae(f, outerSpan);
			$WH.ae(e, f);
			$WH.ae(c, e);
			$WH.ae(b, c)
		}
		if (this.hideHeader)
			this.thead.style.display = "none";
		$WH.ae(this.thead, b)
	},
	createBands : function() {
		var b = $WH.ce("div"), c = $WH.ce("div"), e = $WH.ce("div"), f = $WH
				.ce("div");
		this.bandTop = b;
		this.bandBot = c;
		this.noteTop = e;
		this.noteBot = f;
		b.className = "listview-band-top";
		c.className = "listview-band-bottom";
		this.navTop = this.createNav(!0);
		this.navBot = this.createNav(!1);
		e.className = f.className = "listview-note";
		this.note ? e.innerHTML = this.note : this.createNote
				&& this.createNote(e, f);
		if (this.debug) {
			$WH.ae(e, $WH.ct(" ("));
			var g = $WH.ce("a");
			g.onclick = this.getList.bind(this);
			$WH.ae(g, $WH.ct("CSV"));
			$WH.ae(e, g);
			$WH.ae(e, $WH.ct(")"))
		}
		if (this._errors) {
			var g = $WH.ce("small"), h = $WH.ce("b");
			h.className = "q10 icon-report";
			if (e.innerHTML)
				h.style.marginLeft = "10px";
			g.onmouseover = function(b) {
				$WH.Tooltip.showAtCursor(b, LANG.lvnote_witherrors, 0, 0, "q")
			};
			g.onmousemove = $WH.Tooltip.cursorUpdate;
			g.onmouseout = $WH.Tooltip.hide;
			$WH.st(h, LANG.error);
			$WH.ae(g, h);
			$WH.ae(e, g)
		}
		!e.firstChild
				&& !(this.createCbControls || this.mode == Listview.MODE_CHECKBOX)
				&& $WH.ae(e, $WH.ct(String.fromCharCode(160)));
		this.createCbControls || this.mode == Listview.MODE_CHECKBOX
				|| $WH.ae(f, $WH.ct(String.fromCharCode(160)));
		$WH.ae(b, this.navTop);
		if (this.searchable) {
			var j = this.updateFilters.bind(this, !0), k = this._truncated
					? "search-within-results2"
					: "search-within-results", g = $WH.ce("span"), h = $WH
					.ce("em"), m = $WH.ce("a"), l = $WH.ce("input");
			g.className = "listview-quicksearch";
			this.tabClick && $(g).click(this.tabClick);
			$WH.ae(g, h);
			m.href = "javascript:;";
			m.onclick = function() {
				var b = this.nextSibling;
				b.value = "";
				b.className = k;
				j()
			};
			m.style.display = "none";
			$WH.ae(m, $WH.ce("span"));
			$WH.ae(g, m);
			$WH.ns(m);
			l.setAttribute("type", "text");
			l.className = k;
			l.style.width = this._truncated ? "19em" : "15em";
			g_onAfterTyping(l, j, this.searchDelay);
			l.onmouseover = function() {
				if ($WH.trim(this.value) != "")
					this.className = ""
			};
			l.onfocus = function() {
				this.className = ""
			};
			l.onblur = function() {
				if ($WH.trim(this.value) == "")
					this.className = k, this.value = ""
			};
			l.onkeypress = this.submitSearch.bind(this);
			$WH.ae(g, l);
			this.quickSearchBox = l;
			this.quickSearchGlass = h;
			this.quickSearchClear = m;
			$WH.ae(b, g)
		}
		$WH.ae(b, e);
		$WH.ae(c, this.navBot);
		$WH.ae(c, f);
		if (this.createCbControls || this.mode == Listview.MODE_CHECKBOX) {
			if (this.note)
				e.style.paddingBottom = "5px";
			this.cbBarTop = this.createCbBar(!0);
			this.cbBarBot = this.createCbBar(!1);
			$WH.ae(b, this.cbBarTop);
			$WH.ae(c, this.cbBarBot);
			if (!this.noteTop.firstChild && !this.cbBarTop.firstChild)
				this.noteTop.innerHTML = "&nbsp;";
			if (!this.noteBot.firstChild && !this.cbBarBot.firstChild)
				this.noteBot.innerHTML = "&nbsp;";
			if (this.noteTop.firstChild && this.cbBarTop.firstChild)
				this.noteTop.style.paddingBottom = "6px";
			if (this.noteBot.firstChild && this.cbBarBot.firstChild)
				this.noteBot.style.paddingBottom = "6px"
		}
		if (this.hideBands & 1)
			b.style.display = "none";
		if (this.hideBands & 2)
			c.style.display = "none";
		$WH.ae(this.container, this.bandTop);
		this.clip
				? (b = $WH.ce("div"), b.className = "listview-clip", b.style.width = this.clip.w
						+ "px", b.style.height = this.clip.h + "px", this.clipDiv = b, $WH
						.ae(b, this.mainContainer), $WH.ae(b, this.noData), $WH
						.ae(this.container, b))
				: ($WH.ae(this.container, this.mainContainer), $WH.ae(
						this.container, this.noData));
		$WH.ae(this.container, this.bandBot)
	},
	createNav : function(b) {
		var c = $WH.ce("div"), e = $WH.ce("a"), f = $WH.ce("a"), g = $WH
				.ce("a"), h = $WH.ce("a"), j = $WH.ce("span"), k = $WH.ce("b"), m = $WH
				.ce("b"), l = $WH.ce("b");
		c.className = "listview-nav";
		e.href = f.href = g.href = h.href = "javascript:;";
		$WH.ae(e, $WH.ct(String.fromCharCode(171) + LANG.lvpage_first));
		$WH.ae(f, $WH.ct(String.fromCharCode(8249) + LANG.lvpage_previous));
		$WH.ae(g, $WH.ct(LANG.lvpage_next + String.fromCharCode(8250)));
		$WH.ae(h, $WH.ct(LANG.lvpage_last + String.fromCharCode(187)));
		$WH.ns(e);
		$WH.ns(f);
		$WH.ns(g);
		$WH.ns(h);
		e.onclick = this.firstPage.bind(this);
		f.onclick = this.previousPage.bind(this);
		g.onclick = this.nextPage.bind(this);
		h.onclick = this.lastPage.bind(this);
		this.mode == Listview.MODE_CALENDAR ? ($WH.ae(k, $WH.ct("a")), $WH.ae(
				j, k)) : ($WH.ae(k, $WH.ct("a")), $WH.ae(m, $WH.ct("a")), $WH
				.ae(l, $WH.ct("a")), $WH.ae(j, k), $WH.ae(j, $WH
						.ct(LANG.hyphen)), $WH.ae(j, m), $WH.ae(j, $WH
						.ct(LANG.lvpage_of)), $WH.ae(j, l));
		$WH.ae(c, e);
		$WH.ae(c, f);
		$WH.ae(c, j);
		$WH.ae(c, g);
		$WH.ae(c, h);
		if (b) {
			if (this.hideNav & 1)
				c.style.display = "none"
		} else if (this.hideNav & 2)
			c.style.display = "none";
		this.tabClick && $("a", c).click(this.tabClick);
		return c
	},
	createCbBar : function(b) {
		var c = $WH.ce("div");
		this.createCbControls && this.createCbControls(c, b);
		if (c.firstChild)
			c.className = "listview-withselected" + (b ? "" : "2");
		return c
	},
	refreshRows : function() {
		$WH
				.ee(this.mode == Listview.MODE_DIV
						? this.mainContainer
						: this.tbody);
		if (this.nRowsVisible == 0) {
			if (!this.filtered)
				this.bandTop.style.display = this.bandBot.style.display = "none", this.mainContainer.style.display = "none";
			this.noData.style.display = "";
			this.showNoData()
		} else {
			var b, c;
			if (!(this.hideBands & 1))
				this.bandTop.style.display = "";
			if (!(this.hideBands & 2))
				this.bandBot.style.display = "";
			if (this.nDaysPerMonth && this.nDaysPerMonth.length) {
				for (var e = b = 0; e < this.rowOffset; ++e)
					b += this.nDaysPerMonth[e];
				c = b + this.nDaysPerMonth[e]
			} else if (this.nItemsPerPage > 0) {
				if (b = this.rowOffset, c = Math.min(b + this.nRowsVisible, b
								+ this.nItemsPerPage), this.filtered
						&& this.rowOffset > 0) {
					for (var f = e = 0; e < this.data.length
							&& f < this.rowOffset; ++e) {
						var g = this.data[e];
						g.__hidden || g.__deleted ? ++b : ++f
					}
					c += b - this.rowOffset
				}
			} else
				b = 0, c = this.nRowsVisible;
			var h = c - b;
			if (this.mode == Listview.MODE_DIV)
				for (var j = 0; j < h; ++j) {
					e = b + j;
					g = this.data[e];
					if (!g)
						break;
					g.__hidden || g.__deleted ? ++h : $WH.ae(this.mainDiv, this
									.getDiv(e))
				}
			else if (this.mode == Listview.MODE_TILED) {
				for (var k = 0, f = $WH.ce("tr"), j = 0; j < h; ++j) {
					e = b + j;
					g = this.data[e];
					if (!g)
						break;
					g.__hidden || g.__deleted ? ++h : ($WH.ae(f, this
									.getCell(e)), ++k == this.nItemsPerRow
							&& ($WH.ae(this.tbody, f), j + 1 < h
									&& (f = $WH.ce("tr")), k = 0))
				}
				if (k != 0) {
					for (; k < 4; ++k)
						e = $WH.ce("td"), e.className = "empty-cell", $WH.ae(f,
								e);
					$WH.ae(this.tbody, f)
				}
			} else if (this.mode == Listview.MODE_CALENDAR) {
				f = $WH.ce("tr");
				for (e = 0; e < 7; ++e)
					g = $WH.ce("th"), $WH.st(g, LANG.date_days[e]), $WH
							.ae(f, g);
				$WH.ae(this.tbody, f);
				f = $WH.ce("tr");
				for (k = 0; k < this.dates[b].date.getDay(); ++k)
					e = $WH.ce("td"), e.className = "empty-cell", $WH.ae(f, e);
				for (j = b; j < c; ++j)
					$WH.ae(f, this.getEvent(j)), ++k == 7
							&& ($WH.ae(this.tbody, f), f = $WH.ce("tr"), k = 0);
				if (k != 0) {
					for (; k < 7; ++k)
						e = $WH.ce("td"), e.className = "empty-cell", $WH.ae(f,
								e);
					$WH.ae(this.tbody, f)
				}
			} else
				for (j = 0; j < h; ++j) {
					e = b + j;
					g = this.data[e];
					if (!g)
						break;
					g.__hidden || g.__deleted ? ++h : $WH.ae(this.tbody, this
									.getRow(e))
				}
			this.mainContainer.style.display = "";
			this.noData.style.display = "none"
		}
	},
	showNoData : function() {
		var b = this.noData;
		$WH.ee(b);
		var c = -1;
		this.onNoData && (c = this.onNoData.bind(this, b)());
		c == -1
				&& $WH.ae(this.noData, $WH.ct(this.filtered
								? LANG.lvnodata2
								: LANG.lvnodata))
	},
	getDiv : function(b) {
		var c = this.data[b];
		(c.__div == null || this.minPatchVersion != c.__minPatch)
				&& this.createDiv(c, b);
		return c.__div
	},
	createDiv : function(b, c) {
		var e = $WH.ce("div");
		b.__div = e;
		if (this.minPatchVersion)
			b.__minPatch = this.minPatchVersion;
		this.template.compute.bind(this, b, e, c)()
	},
	getCell : function(b) {
		var c = this.data[b];
		c.__td == null && this.createCell(c, b);
		return c.__td
	},
	createCell : function(b, c) {
		var e = $WH.ce("td");
		b.__td = e;
		this.template.compute.bind(this, b, e, c)()
	},
	getEvent : function(b) {
		var c = this.dates[b];
		c.__td == null && this.createEvent(c, b);
		return c.__td
	},
	createEvent : function(b, c) {
		b.events = $WH.array_filter(this.data, function(c) {
			if (c.__hidden || c.__deleted)
				return !1;
			c = Listview.funcBox.getEventNextDates(c.startDate, c.endDate,
					c.rec || 0, b.date);
			if (c[0] && c[1])
				return c[0].setHours(0, 0, 0, 0), c[1].setHours(0, 0, 0, 0), c[0] <= b.date
						&& c[1] >= b.date;
			return !1
		});
		var e = $WH.ce("td");
		b.__td = e;
		if (b.date.getFullYear() == g_serverTime.getFullYear()
				&& b.date.getMonth() == g_serverTime.getMonth()
				&& b.date.getDate() == g_serverTime.getDate())
			e.className = "calendar-today";
		var f = $WH.ce("div");
		f.className = "calendar-date";
		$WH.st(f, b.date.getDate());
		$WH.ae(e, f);
		f = $WH.ce("div");
		f.className = "calendar-event";
		$WH.ae(e, f);
		this.template.compute.bind(this, b, f, c)();
		if (this.getItemLink)
			e.onclick = this.itemClick.bind(this, b)
	},
	getRow : function(b) {
		b = this.data[b];
		b.__tr == null && this.createRow(b);
		return b.__tr
	},
	setRow : function(b) {
		if (this.data[b.pos])
			this.data[b.pos] = b, this.data[b.pos].__tr = b.__tr, this
					.createRow(this.data[b.pos]), this.refreshRows()
	},
	createRow : function(b) {
		var c = $WH.ce("tr");
		b.__tr = c;
		if (this.mode == Listview.MODE_CHECKBOX
				&& (!$WH.isset("g_thottbot") || !g_thottbot)) {
			var e = $WH.ce("td");
			if (!b.__nochk) {
				e.className = "listview-cb";
				e.onclick = Listview.cbCellClick;
				var f = $WH.ce("input");
				$WH.ns(f);
				f.type = "checkbox";
				f.onclick = Listview.cbClick;
				if (b.__chk)
					f.checked = !0;
				b.__cb = f;
				$WH.ae(e, f)
			}
			$WH.ae(c, e)
		}
		for (var f = 0, g = this.visibility.length; f < g; ++f) {
			var h = this.visibility[f], j = this.columns[h], e = $WH.ce("td");
			if (j.align != null)
				e.style.textAlign = j.align;
			h = j.compute
					? j.compute.bind(this, b, e, c, h)()
					: b[j.value] != null ? b[j.value] : -1;
			h != -1 && h != null && e.insertBefore($WH.ct(h), e.firstChild);
			$WH.ae(c, e)
		}
		if (this.mode == Listview.MODE_CHECKBOX && b.__chk)
			c.className = "checked";
		if (this.getItemLink)
			c.onclick = this.itemClick.bind(this, b)
	},
	itemClick : function(b, c) {
		for (var c = $WH.$E(c), e = c._target; e;) {
			if (e.nodeName == "A")
				return;
			e = e.parentNode
		}
		location.href = this.getItemLink(b)
	},
	submitSearch : function(b) {
		b = $WH.$E(b);
		if (this.onSearchSubmit && b.keyCode == 13)
			for (var b = 0, c = this.data.length; b < c; ++b)
				this.data[b].__hidden
						|| this.onSearchSubmit.bind(this, this.data[b])()
	},
	validatePage : function() {
		var b = this.nItemsPerPage, c = this.rowOffset, e = this.nRowsVisible;
		this.rowOffset = c < 0 ? 0 : this.mode == Listview.MODE_CALENDAR ? Math
				.min(c, this.nDaysPerMonth.length - 1) : this.getRowOffset(c
				+ b > e ? e - 1 : c)
	},
	getRowOffset : function(b) {
		var c = this.nItemsPerPage;
		return c > 0 && b > 0 ? Math.floor(b / c) * c : 0
	},
	resetRowVisibility : function() {
		for (var b = 0, c = this.data.length; b < c; ++b)
			this.data[b].__hidden = !1;
		this.filtered = !1;
		this.rowOffset = 0;
		this.nRowsVisible = this.data.length
	},
	getColText : function(b, c) {
		var e = "";
		this.template.getVisibleText
				&& (e = $WH.trim(this.template.getVisibleText(b) + " "));
		if (c.getVisibleText)
			return e + c.getVisibleText(b);
		if (c.getValue)
			return e + c.getValue(b);
		if (c.value)
			return e + b[c.value];
		if (c.compute)
			return e + c.compute(b);
		return ""
	},
	resetFilters : function() {
		for (var b = 0, c = this.visibility.length; b < c; ++b) {
			var e = this.columns[this.visibility[b]];
			if (e.__filter)
				e.__th.firstChild.firstChild.className = "", e.__filter = null, --this.nFilters
		}
	},
	updateFilters : function(b) {
		$WH.Tooltip.hide();
		this.resetRowVisibility();
		var c, e, f;
		if (this.searchable)
			this.quickSearchBox.parentNode.style.display = "", (c = $WH
					.trim(this.quickSearchBox.value))
					? (this.quickSearchGlass.style.display = "none", this.quickSearchClear.style.display = "", c = c
							.toLowerCase().replace(/\s+/g, " "), e = c
							.split(" "), f = e.length)
					: (this.quickSearchGlass.style.display = "", this.quickSearchClear.style.display = "none");
		else if (this.quickSearchBox)
			this.quickSearchBox.parentNode.style.display = "none";
		if (c || !(this.nFilters == 0 && this.customFilter == null)) {
			for (var g = {
				1 : function(b, c) {
					return b > c
				},
				2 : function(b, c) {
					return b == c
				},
				3 : function(b, c) {
					return b < c
				},
				4 : function(b, c) {
					return b >= c
				},
				5 : function(b, c) {
					return b <= c
				},
				6 : function(b, c, e) {
					return c <= b && b <= e
				}
			}, h = {
				1 : function(b, c, e) {
					return c > e
				},
				2 : function(b, c, e) {
					return b <= e && e <= c
				},
				3 : function(b, c, e) {
					return b < e
				},
				4 : function(b, c, e) {
					return c >= e
				},
				5 : function(b, c, e) {
					return b <= e
				},
				6 : function(b, c, e, f) {
					return e <= c && b <= f
				}
			}, j = 0, k = 0, m = this.data.length; k < m; ++k) {
				var l = this.data[k], o = 0;
				nSearchMatches = 0;
				matches = [];
				l.__hidden = !0;
				if (!this.customFilter || this.customFilter(l, k)) {
					for (var q = 0, v = this.visibility.length; q < v; ++q) {
						var p = this.columns[this.visibility[q]];
						if (p.__filter) {
							var r = p.__filter, t = !1;
							if (p.type != null && p.type == "range")
								var z = p.getMinValue(l), t = p.getMaxValue(l), t = h[r.type](
										z, t, r.value, r.value2);
							else if (p.type == null || p.type == "num"
									|| r.type > 0)
								z = null, p.getValue
										? z = p.getValue(l)
										: p.value
												&& (z = parseFloat(l[p.value])), z
										|| (z = 0), t = g[r.type](z, r.value,
										r.value2);
							else if (z = this.getColText(l, p))
								if (z = z.toString().toLowerCase(), r.invert)
									t = z.match(r.regex) != null;
								else {
									for (var u = t = 0, D = r.words.length; u < D; ++u)
										if (z.indexOf(r.words[u]) != -1)
											++t;
										else
											break;
									t = t == r.words.length
								}
							r.invert && (t = !t);
							if (t)
								++o;
							else
								break
						}
						if (c && (z = this.getColText(l, p))) {
							z = z.toString().toLowerCase();
							u = 0;
							for (D = e.length; u < D; ++u)
								!matches[u] && z.indexOf(e[u]) != -1
										&& (matches[u] = 1, ++nSearchMatches)
						}
					}
					if (l.__alwaysvisible
							|| (this.nFilters == 0 || o == this.nFilters)
							&& (!c || nSearchMatches == f))
						l.__hidden = !1, ++j
				}
			}
			this.filtered = j < this.data.length;
			this.nRowsVisible = j
		}
		b && (this.updateNav(), this.refreshRows())
	},
	changePage : function() {
		this.validatePage();
		this.refreshRows();
		this.updateNav();
		this.updatePound();
		var b = $WH.g_getScroll(), c = $WH.ac(this.container);
		b.y > c[1] && scrollTo(b.x, c[1])
	},
	firstPage : function() {
		this.rowOffset = 0;
		this.changePage();
		return !1
	},
	previousPage : function() {
		this.rowOffset -= this.nItemsPerPage;
		this.changePage();
		return !1
	},
	nextPage : function() {
		this.rowOffset += this.nItemsPerPage;
		this.changePage();
		return !1
	},
	lastPage : function() {
		this.rowOffset = 99999999;
		this.changePage();
		return !1
	},
	addSort : function(b, c) {
		var e = $WH.in_array(b, Math.abs(c), function(b) {
					return Math.abs(b)
				});
		e != -1 && (c = b[e], b.splice(e, 1));
		b.splice(0, 0, c)
	},
	sortBy : function(b) {
		if (!(b <= 0 || b > this.columns.length)) {
			if (Math.abs(this.sort[0]) == b)
				this.sort[0] = -this.sort[0];
			else {
				var c = -1;
				this.columns[b - 1].type == "text" && (c = 1);
				this.addSort(this.sort, c * b)
			}
			this.applySort();
			this.refreshRows();
			this.updateSortArrow();
			this.updatePound()
		}
	},
	applySort : function() {
		if (this.sort.length != 0)
			Listview.sort = this.sort, Listview.columns = this.columns, this.indexCreated
					? this.data.sort(Listview.sortIndexedRows.bind(this))
					: this.data.sort(Listview.sortRows.bind(this)), this
					.updateSortIndex()
	},
	setSort : function(b, c, e) {
		if (this.sort.toString() != b.toString())
			this.sort = b, this.applySort(), c && this.refreshRows(), e
					&& this.updatePound()
	},
	readPound : function() {
		if (!this.poundable || !location.hash.length)
			return !1;
		var b = location.hash.substr(1);
		if (this.tabs) {
			var c = b.lastIndexOf(":");
			if (c == -1)
				return !1;
			b = b.substr(c + 1)
		}
		c = parseInt(b);
		if (!isNaN(c)) {
			this.rowOffset = c;
			this.validatePage();
			if (this.poundable != 2) {
				var c = [], e = b.match(/(\+|\-)[0-9]+/g);
				if (e != null) {
					for (var f = e.length - 1; f >= 0; --f) {
						var g = parseInt(e[f]) | 0, b = Math.abs(g);
						if (b <= 0 || b > this.columns.length)
							break;
						this.addSort(c, g)
					}
					this.setSort(c, !1, !1)
				}
			}
			this.tabs
					&& this.tabs.setTabPound(this.tabIndex, this.getTabPound())
		}
	},
	updateSortArrow : function() {
		if (this.sort.length
				&& this.thead
				&& !(this.mode == Listview.MODE_TILED || this.mode == Listview.MODE_CALENDAR)) {
			var b = $WH.in_array(this.visibility, Math.abs(this.sort[0]) - 1);
			if (b != -1) {
				this.mode == Listview.MODE_CHECKBOX
						&& b < this.thead.firstChild.childNodes.length - 1
						&& (b += 1);
				b = this.thead.firstChild.childNodes[b].firstChild.firstChild.firstChild;
				if (this.lsa && this.lsa != b)
					this.lsa.className = "";
				b.className = this.sort[0] < 0 ? "sortdesc" : "sortasc";
				this.lsa = b
			}
		}
	},
	updateSortIndex : function() {
		for (var b = this.data, c = 0, e = b.length; c < e; ++c)
			b[c].__si = c;
		this.indexCreated = !0
	},
	updateTabName : function() {
		this.tabs && this.tabIndex != null
				&& this.tabs.setTabName(this.tabIndex, this.getTabName())
	},
	updatePound : function(b) {
		if (this.poundable) {
			var c = "", e = "";
			b ? location.hash.length
					&& this.tabs
					&& (b = location.hash.lastIndexOf(":"), b != -1
							&& !isNaN(parseInt(location.hash.substr(b + 1)))
							&& (c = location.hash.substr(b + 1))) : c = this
					.getTabPound();
			if (this.customPound)
				e = this.customPound;
			else if (this.tabs)
				e = this.id;
			c && this.tabs && this.tabs.setTabPound(this.tabIndex, c);
			location.replace("#" + e + (e && c ? ":" : "") + c)
		}
	},
	updateNav : function() {
		var b = [this.navTop, this.navBot], c = this.nItemsPerPage, e = this.rowOffset, f = this.nRowsVisible, g = 0, h = 0, j = 0, k = 0, m = new Date;
		if (f > 0) {
			if (!(this.hideNav & 1))
				b[0].style.display = "";
			if (!(this.hideNav & 2))
				b[1].style.display = ""
		} else
			b[0].style.display = b[1].style.display = "none";
		if (this.mode == Listview.MODE_CALENDAR) {
			for (var l = 0; l < this.nDaysPerMonth.length; ++l)
				l == e
						&& (l > 0 && (h = 1), l > 1 && (g = 1), l < this.nDaysPerMonth.length
								- 1
								&& (j = 1), l < this.nDaysPerMonth.length - 2
								&& (k = 1));
			m.setTime(this.startOnMonth.valueOf());
			m.setMonth(m.getMonth() + e)
		} else
			c
					&& (e > 0 && (h = 1, e >= c + c && (g = 1)), e + c < f
							&& (j = 1, e + c + c < f && (k = 1)));
		for (l = 0; l < 2; ++l) {
			var o = b[l].childNodes;
			o[0].style.display = g ? "" : "none";
			o[1].style.display = h ? "" : "none";
			o[3].style.display = j ? "" : "none";
			o[4].style.display = k ? "" : "none";
			o = o[2].childNodes;
			this.mode == Listview.MODE_CALENDAR
					? o[0].firstChild.nodeValue = LANG.date_months[m.getMonth()]
							+ " " + m.getFullYear()
					: (o[0].firstChild.nodeValue = e + 1, o[2].firstChild.nodeValue = c
							? Math.min(e + c, f)
							: f, o[4].firstChild.nodeValue = f)
		}
	},
	getTabName : function() {
		for (var b = this.name, c = this.data.length, e = 0, f = this.data.length; e < f; ++e)
			(this.data[e].__hidden || this.data[e].__deleted) && --c;
		c > 0 && !this.hideCount && (b += $WH.sprintf(LANG.qty, c));
		return b
	},
	getTabPound : function() {
		var b = "";
		b += this.rowOffset;
		this.poundable != 2 && this.sort.length
				&& (b += ("+" + this.sort.join("+")).replace(/\+\-/g, "-"));
		return b
	},
	getCheckedRows : function() {
		for (var b = [], c = 0, e = this.data.length; c < e; ++c) {
			var f = this.data[c];
			(f.__cb && f.__cb.checked || !f.__cb && f.__chk) && b.push(f)
		}
		return b
	},
	resetCheckedRows : function() {
		for (var b = 0, c = this.data.length; b < c; ++b) {
			var e = this.data[b];
			if (e.__cb)
				e.__cb.checked = !1;
			else if (e.__chk)
				e.__chk = null;
			if (e.__tr)
				e.__tr.className = e.__tr.className.replace("checked", "")
		}
	},
	deleteRows : function(b) {
		if (b && b.length) {
			for (var c = 0, e = b.length; c < e; ++c) {
				var f = b[c];
				!f.__hidden && !f.__hidden && (this.nRowsVisible -= 1);
				f.__deleted = !0
			}
			this.updateTabName();
			this.rowOffset >= this.nRowsVisible ? this.previousPage() : (this
					.refreshRows(), this.updateNav())
		}
	},
	setData : function(b) {
		this.data = b;
		this.indexCreated = !1;
		this.resetCheckedRows();
		this.resetRowVisibility();
		this.tabs ? (this.pounded = this.tabs.poundedTab == this.tabIndex)
				&& this.readPound() : this.readPound();
		this.applySort();
		this.updateSortArrow();
		this.customFilter != null && this.updateFilters();
		this.updateNav();
		this.refreshRows()
	},
	getClipDiv : function() {
		return this.clipDiv
	},
	getNoteTopDiv : function() {
		return this.noteTop
	},
	focusSearch : function() {
		this.quickSearchBox.focus()
	},
	clearSearch : function() {
		this.quickSearchBox.value = ""
	},
	getList : function() {
		if (this.debug) {
			for (var b = "", c = 0; c < this.data.length; c++)
				this.data[c].__hidden || (b += this.data[c].id + ", ");
			listviewIdList.show(b)
		}
	},
	createIndicator : function(b, c, e) {
		if (!this.noteIndicators)
			this.noteIndicators = $WH.ce("div"), this.noteIndicators.className = "listview-indicators", $(this.noteIndicators)
					.insertBefore($(this.noteTop));
		var f = this.tabClick;
		$(this.noteIndicators)
				.append($('<span class="indicator"></span>')
						.html(b)
						.append(!c
								? ""
								: $('<a class="indicator-x" style="outline: none">[x]</a>')
										.attr(
												"href",
												typeof c == "function"
														? "javascript:;"
														: c).click(function() {
													f && f();
													typeof c == "function"
															&& c()
												})).css("cursor",
								typeof e == "function" ? "pointer" : null)
						.click(function() {
									f && f();
									typeof e == "function" && e()
								}));
		$(this.noteTop).css("padding-top", "7px")
	},
	removeIndicators : function() {
		if (this.noteIndicators)
			$(this.noteIndicators).remove(), this.noteIndicators = null;
		$(this.noteTop).css("padding-top", "")
	}
};
Listview.sortRows = function(b, c) {
	for (var e = Listview.sort, f = Listview.columns, g = 0, h = e.length; g < h; ++g) {
		var j;
		j = f[Math.abs(e[g]) - 1];
		if (!j)
			j = this.template;
		j = j.sortFunc ? j.sortFunc(b, c, e[g]) : $WH.strcmp(b[j.value],
				c[j.value]);
		if (j != 0)
			return j * e[g]
	}
	return 0
};
Listview.sortIndexedRows = function(b, c) {
	var e = Listview.sort, f = Listview.columns[Math.abs(e[0]) - 1];
	if (!f)
		f = this.template;
	f = f.sortFunc ? f.sortFunc(b, c, e[0]) : $WH
			.strcmp(b[f.value], c[f.value]);
	if (f != 0)
		return f * e[0];
	return b.__si - c.__si
};
Listview.cbSelect = function(b) {
	for (var c = 0, e = this.data.length; c < e; ++c) {
		var f = this.data[c], g = b;
		if (!f.__hidden) {
			if (!f.__nochk && f.__cb) {
				var h = f.__cb, j = h.parentNode.parentNode;
				g == null && (g = !h.checked);
				if (h.checked != g)
					h.checked = g, j.className = h.checked ? j.className
							+ " checked" : j.className.replace("checked", "")
			} else
				g == null && (g = !0);
			f.__chk = g
		}
	}
};
Listview.cbClick = function(b) {
	setTimeout(Listview.cbUpdate.bind(0, 0, this, this.parentNode.parentNode),
			1);
	$WH.sp(b)
};
Listview.cbCellClick = function(b) {
	setTimeout(Listview.cbUpdate.bind(0, 1, this.firstChild, this.parentNode),
			1);
	$WH.sp(b)
};
Listview.cbUpdate = function(b, c, e) {
	if (b)
		c.checked = !c.checked;
	e.className = c.checked ? e.className + " checked" : e.className.replace(
			"checked", "")
};
Listview.headerClick = function(b, c, e) {
	e = $WH.$E(e);
	this.tabClick && this.tabClick();
	e._button == 3 || e.shiftKey || e.ctrlKey
			? ($WH.Tooltip.hide(), setTimeout(Listview.headerFilter.bind(this,
							b, null), 1))
			: this.sortBy(c + 1);
	return !1
};
Listview.headerFilter = function(b, c) {
	var e = "";
	b.__filter && (b.__filter.invert && (e += "!"), e += b.__filter.text);
	c == null
			&& (c = prompt($WH.sprintf(LANG.prompt_colfilter1
									+ (b.type == "text"
											? LANG.prompt_colfilter2
											: LANG.prompt_colfilter3), b.name),
					e));
	if (c != null) {
		e = {
			text : "",
			type : -1
		};
		c = $WH.trim(c.replace(/\s+/g, " "));
		if (!c && this.onEmptyFilter)
			this.onEmptyFilter(b);
		else if (c) {
			if (c.charAt(0) == "!" || c.charAt(0) == "-")
				e.invert = 1, c = c.substr(1);
			if (b.type == "text")
				e.type = 0, e.text = c, e.invert
						? e.regex = g_createOrRegex(c)
						: e.words = c.toLowerCase().split(" ");
			var f, g;
			if (c.match(/(>|=|<|>=|<=)\s*([0-9\.]+)/)) {
				if (f = parseFloat(RegExp.$2), !isNaN(f)) {
					switch (RegExp.$1) {
						case ">" :
							e.type = 1;
							break;
						case "=" :
							e.type = 2;
							break;
						case "<" :
							e.type = 3;
							break;
						case ">=" :
							e.type = 4;
							break;
						case "<=" :
							e.type = 5
					}
					e.value = f;
					e.text = RegExp.$1 + " " + f
				}
			} else if (c.match(/([0-9\.]+)\s*\-\s*([0-9\.]+)/)) {
				if (f = parseFloat(RegExp.$1), g = parseFloat(RegExp.$2), !isNaN(f)
						&& !isNaN(g)) {
					if (f > g) {
						var h = f;
						f = g;
						g = h
					}
					f == g
							? (e.type = 2, e.value = f, e.text = "= " + f)
							: (e.type = 6, e.value = f, e.value2 = g, e.text = f
									+ " - " + g)
				}
			} else if (g = c.toLowerCase().split(" "), !b.allText
					&& g.length == 1 && !isNaN(f = parseFloat(g[0])))
				e.type = 2, e.value = f, e.text = "= " + f;
			else if (b.type == "text")
				e.type = 0, e.text = c, e.invert
						? e.regex = g_createOrRegex(c)
						: e.words = g;
			if (e.type == -1) {
				alert(LANG.message_invalidfilter);
				return
			}
		}
		if (!b.__filter || e.text != b.__filter.text
				|| e.invert != b.__filter.invert) {
			f = b.__th.firstChild.firstChild;
			if (c && e.text) {
				if (!b.__filter)
					f.className = "q5", ++this.nFilters;
				b.__filter = e
			} else {
				if (b.__filter)
					f.className = "", --this.nFilters;
				b.__filter = null
			}
			this.updateFilters(1)
		}
	}
};
Listview.headerOver = function(b, c) {
	var e = "";
	e += $WH.isset("g_thottbot") && g_thottbot ? '<b class="w">'
			+ (c.tooltip ? c.tooltip : c.name) + "</b>" : '<b class="q1">'
			+ (c.tooltip ? c.tooltip : c.name) + "</b>";
	c.__filter
			&& (e += "<br />"
					+ $WH.sprintf(c.__filter.invert
									? LANG.tooltip_colfilter2
									: LANG.tooltip_colfilter1, c.__filter.text));
	e += '<br /><span class="q2">' + LANG.tooltip_lvheader1 + "</span>";
	if (this.filtrable && (c.filtrable == null || c.filtrable))
		e += '<br /><span class="q2">'
				+ ($WH.Browser.opera
						? LANG.tooltip_lvheader3
						: LANG.tooltip_lvheader2) + "</span>";
	$WH.Tooltip.show(b, e, 0, 0, "q")
};
Listview.extraCols = {
	id : {
		id : "id",
		name : "ID",
		width : "5%",
		compute : function(b, c) {
			b.id && $WH.ae(c, $WH.ct(b.id))
		}
	},
	patch : {
		id : "obj-patch",
		name : LANG.patch,
		compute : function(b, c) {
			if (typeof b.patch != "undefined") {
				var e = parseInt(b.patch);
				e == 0 || e == -1 ? $WH.ae(c, $WH.ct("???")) : (e = $WH
						.sprintf("$1.$2.$3", Math.floor(e / 1E4), Math.floor(e
										/ 100)
										% 100, e % 100), $WH.ae(c, $WH.ct(e)))
			}
		},
		sortFunc : function(b, c) {
			return b.patch == c.patch ? 0 : b.patch < c.patch ? -1 : 1
		}
	},
	date : {
		id : "obj-date",
		name : LANG.added,
		compute : function(b, c) {
			if (b.date)
				if (b.date <= 86400)
					$WH.ae(c, $WH.ct("???"));
				else {
					var e = new Date(b.date * 1E3);
					return Listview.funcBox.coFormatDate(c, (g_serverTime - e)
									/ 1E3, e, null, !0)
				}
		},
		sortFunc : function(b, c) {
			return b.date == c.date ? 0 : b.date < c.date ? -1 : 1
		}
	},
	cost : {
		id : "cost",
		name : LANG.cost,
		getValue : function(b) {
			if (b.cost)
				return (b.cost[2] && b.cost[2][0] ? b.cost[2][0][1] : 0)
						|| (b.cost[1] && b.cost[1][0] ? b.cost[1][0][1] : 0)
						|| b.cost[0]
		},
		compute : function(b, c) {
			if (b.cost) {
				var e = b.cost[0], f = null, g = b.cost[2], h = b.cost[1];
				b.side != null ? f = b.side : b.react != null
						&& (b.react[0] == 1 && b.react[1] == -1
								? f = 1
								: b.react[0] == -1 && b.react[1] == 1
										&& (f = 2));
				Listview.funcBox.appendMoney(c, e, f, g, h, 0)
			}
		},
		sortFunc : function(b, c) {
			if (b.cost == null)
				return -1;
			else if (c.cost == null)
				return 1;
			var e = 0, f = 0, g = 0, h = 0;
			b.cost[2] != null
					&& $WH.array_walk(b.cost[2], function(b, c, f, g) {
								e += Math.pow(10, g) + b[1]
							});
			c.cost[2] != null
					&& $WH.array_walk(c.cost[2], function(b, c, e, g) {
								f += Math.pow(10, g) + b[1]
							});
			b.cost[1] != null
					&& $WH.array_walk(b.cost[1], function(b, c, e, f) {
								g += Math.pow(10, f) + b[1]
							});
			c.cost[1] != null
					&& $WH.array_walk(c.cost[1], function(b, c, e, f) {
								h += Math.pow(10, f) + b[1]
							});
			return $WH.strcmp(e, f) || $WH.strcmp(g, h)
					|| $WH.strcmp(b.cost[0], c.cost[0])
		}
	},
	count : {
		id : "count",
		name : LANG.count,
		value : "count",
		compute : function(b, c) {
			if (this._totalCount > 0 || b.outof > 0) {
				if (b.outof) {
					var e = $WH.ce("div");
					e.className = "small q0";
					$WH.ae(e, $WH.ct($WH.sprintf(LANG.lvdrop_outof, b.outof)));
					$WH.ae(c, e)
				}
				return b.count
			}
		},
		getVisibleText : function(b) {
			var c = b.count;
			b.outof && (c += " " + b.outof);
			return c
		},
		sortFunc : function(b, c) {
			if (b.count == null)
				return -1;
			else if (c.count == null)
				return 1;
			return $WH.strcmp(b.count, c.count)
		}
	},
	percent : {
		id : "percent",
		name : "%",
		value : "percent",
		compute : function(b, c) {
			if (b.count <= 0)
				return "??";
			if (b.pctstack) {
				var e = "", f = eval("(" + b.pctstack + ")"), g;
				for (g in f) {
					var h = f[g] * b.percent / 100, h = h >= 1.95
							? parseFloat(h.toFixed(0))
							: h >= 0.195
									? parseFloat(h.toFixed(1))
									: parseFloat(h.toFixed(2));
					e += $WH.sprintf(LANG.stackof_format, g, h) + "<br />"
				}
				$(c).addClass("tip").mouseover(function(b) {
							$WH.Tooltip.showAtCursor(b, e, 0, 0, "q")
						}).mousemove(function(b) {
							$WH.Tooltip.cursorUpdate(b)
						}).mouseout(function() {
							$WH.Tooltip.hide()
						})
			}
			f = parseFloat(b.percent.toFixed(b.percent >= 1.95
					? 0
					: b.percent >= 0.195 ? 1 : 2));
			if (b.pctstack)
				$(c).append($("<span>").addClass("tip").text(f));
			else
				return f
		},
		getVisibleText : function(b) {
			if (b.count <= 0)
				return "??";
			return b.percent >= 1.95
					? b.percent.toFixed(0)
					: b.percent >= 0.195
							? parseFloat(b.percent.toFixed(1))
							: parseFloat(b.percent.toFixed(2))
		},
		sortFunc : function(b, c) {
			if (b.count == null)
				return -1;
			else if (c.count == null)
				return 1;
			var e = b.percent >= 1.95
					? b.percent.toFixed(0)
					: b.percent >= 0.195
							? parseFloat(b.percent.toFixed(1))
							: parseFloat(b.percent.toFixed(2)), f = c.percent >= 1.95
					? c.percent.toFixed(0)
					: c.percent >= 0.195
							? parseFloat(c.percent.toFixed(1))
							: parseFloat(c.percent.toFixed(2));
			return $WH.strcmp(e, f)
		}
	},
	stock : {
		id : "stock",
		name : LANG.stock,
		width : "10%",
		value : "stock",
		compute : function(b, c) {
			return b.stock > 0
					? b.stock
					: (c.style.fontFamily = "Verdana, sans-serif", String
							.fromCharCode(8734))
		},
		getVisibleText : function(b) {
			return b.stock > 0 ? b.stock : String.fromCharCode(8734)
					+ " infinity"
		}
	},
	currency : {
		id : "currency",
		name : LANG.currency,
		getValue : function(b) {
			if (b.currency)
				return b.currency[0] ? b.currency[0][1] : 0
		},
		compute : function(b, c) {
			if (b.currency) {
				var e = null;
				b.side != null ? e = b.side : b.react != null
						&& (b.react[0] == 1 && b.react[1] == -1
								? e = 1
								: b.react[0] == -1 && b.react[1] == 1
										&& (e = 2));
				Listview.funcBox.appendMoney(c, null, e, null, b.currency)
			}
		},
		sortFunc : function(b, c) {
			if (b.currency == null)
				return -1;
			else if (c.currency == null)
				return 1;
			var e = 0, f = 0;
			$WH.array_walk(b.currency, function(b, c, f, k) {
						e += Math.pow(10, k) + b[1]
					});
			$WH.array_walk(c.currency, function(b, c, e, k) {
						f += Math.pow(10, k) + b[1]
					});
			return $WH.strcmp(e, f)
		}
	},
	mode : {
		id : "mode",
		name : "Mode",
		after : "name",
		type : "text",
		compute : function(b) {
			if (b.modes && b.modes.mode) {
				if ((b.modes.mode & 120) == 120 || (b.modes.mode & 3) == 3)
					return LANG.pr_note_all;
				return Listview.extraCols.mode.getVisibleText(b)
			}
		},
		getVisibleText : function(b) {
			var c = !!(b.modes.mode & 26), e = !!(b.modes.mode & 97), f = !!(b.modes.mode & 40), b = !!(b.modes.mode & 80), g;
			f && !b ? g = 10 : b && !f && (g = 25);
			var h;
			c && !e ? h = "normal" : e && !c && (h = "heroic");
			if (h)
				return g ? $WH.sprintf(LANG["tab_" + h + "X"], g) : LANG["tab_"
						+ h];
			if (g)
				return $WH.sprintf(LANG.lvzone_xman, g);
			return LANG.pr_note_all
		},
		sortFunc : function(b, c) {
			if (b.modes && c.modes)
				return -$WH.strcmp(b.modes.mode, c.modes.mode)
		}
	},
	requires : {
		id : "requires",
		name : LANG.requires,
		type : "text",
		compute : function(b, c) {
			if (b.achievement && g_achievements[b.achievement]) {
				$WH.nw(c);
				c.className = "small";
				c.style.lineHeight = "18px";
				var e = $WH.ce("a");
				e.href = "/achievement=" + b.achievement;
				e.className = "icontiny";
				e.style.backgroundImage = "url(" + g_staticUrl
						+ "/images/wow/icons/tiny/"
						+ g_achievements[b.achievement].icon.toLowerCase()
						+ ".gif)";
				e.style.whiteSpace = "nowrap";
				$WH.st(e, g_achievements[b.achievement]["name_"
								+ Locale.getName()]);
				$WH.ae(c, e)
			}
		},
		getVisibleText : function(b) {
			if (b.achievement && g_achievements[b.achievement])
				return g_achievements[b.achievement].name
		},
		sortFunc : function(b, c) {
			return $WH.strcmp(this.getVisibleText(b), this.getVisibleText(c))
		}
	},
	reqskill : {
		id : "reqskill",
		name : LANG.skill,
		width : "10%",
		value : "reqskill",
		before : "yield"
	},
	yield : {
		id : "yield",
		name : LANG.yields,
		type : "text",
		align : "left",
		span : 2,
		value : "name",
		compute : function(b, c, e) {
			if (b.yield && g_items[b.yield]) {
				var f = $WH.ce("td");
				f.style.width = "1px";
				f.style.padding = "0";
				f.style.borderRight = "none";
				$WH.ae(f, g_items.createIcon(b.yield, 1));
				$WH.ae(e, f);
				c.style.borderLeft = "none";
				e = $WH.ce("div");
				f = $WH.ce("a");
				f.style.fontFamily = "Verdana, sans-serif";
				f.href = link_178db("item", b.yield);
				f.className = "q" + g_items[b.yield].quality;
				$WH.ae(f, $WH.ct(g_items[b.yield]["name_" + Locale.getName()]));
				$WH.ae(e, f);
				$WH.ae(c, e)
			}
		},
		getVisibleText : function(b) {
			if (b.yield && g_items[b.yield])
				return g_items[b.yield]["name_" + Locale.getName()]
		},
		sortFunc : function(b, c) {
			if (!b.yield || !g_items[b.yield] || !c.yield || !g_items[c.yield])
				return b.yield && g_items[b.yield] ? 1 : c.yield
						&& g_items[c.yield] ? -1 : 0;
			return -$WH.strcmp(g_items[b.yield].quality,
					g_items[c.yield].quality)
					|| $WH.strcmp(g_items[b.yield]["name_" + Locale.getName()],
							g_items[c.yield]["name_" + Locale.getName()])
		}
	}
};
Listview.funcBox = {
	createSimpleCol : function(b, c, e, f) {
		return {
			id : b,
			name : LANG[c] !== void 0 ? LANG[c] : c,
			width : e,
			value : f
		}
	},
	initLootTable : function(b) {
		var c;
		c = this._totalCount != null ? this._totalCount : b.outof;
		b.percent = c == 0 ? b.count != -1 ? b.count : 0 : b.count / c * 100;
		Listview.funcBox.initModeFilter.bind(this, b)()
	},
	initModeFilter : function(b) {
		if (this._lootModes == null)
			this._lootModes = {
				99 : 0
			};
		if (this._distinctModes == null)
			this._distinctModes = {
				99 : 0
			};
		if ((!b.modes || b.modes.mode == 4) && b.classs != 12 && b.percent < 1)
			this._lootModes[99]++, this._distinctModes[99]++;
		else if (b.modes) {
			for (var c = -2; c <= 4; ++c)
				this._lootModes[c] == null && (this._lootModes[c] = 0), b.modes.mode
						& 1 << parseInt(c) + 2 && this._lootModes[c]++;
			this._distinctModes[b.modes.mode] == null
					&& (this._distinctModes[b.modes.mode] = 0);
			this._distinctModes[b.modes.mode]++
		}
	},
	addModeIndicator : function() {
		var b = 0, c;
		for (c in this._distinctModes)
			this._distinctModes[c] && b++;
		if (!(b < 2)) {
			var e = location.hash.match(/:mode=([^:]+)/), f = [0, -1, -2, 1, 3,
					2, 4, 99], g = {
				"-2" : LANG.tab_heroic,
				"-1" : LANG.tab_normal,
				0 : LANG.tab_noteworthy,
				1 : $WH.sprintf(LANG.tab_normalX, 10),
				2 : $WH.sprintf(LANG.tab_normalX, 25),
				3 : $WH.sprintf(LANG.tab_heroicX, 10),
				4 : $WH.sprintf(LANG.tab_heroicX, 25),
				99 : ""
			}, h = function(b, c, e) {
				g_setSelectedLink(this, "lootmode");
				j.customPound = j.id
						+ (c != null ? ":mode="
								+ g_urlize(g[c].replace(" ", "")) : "");
				j.customFilter = function(c) {
					return Listview.funcBox.filterMode(c, j._totalCount, b)
				};
				j.updateFilters(1);
				j.applySort();
				j.refreshRows();
				e && j.updatePound(1)
			}, j = this, b = [], k;
			k = $("<a><span>" + LANG.pr_note_all + "</span></a>");
			k[0].f = h.bind(k[0], null, null, 1);
			k.click(k[0].f);
			var m = h.bind(k[0], null, null, 0);
			m();
			b.push($('<span class="indicator-mode"></span>').append(k)
					.append($("<b>" + LANG.pr_note_all + "</b>")));
			for (var l = 0, o = f.length; l < o; ++l)
				if (c = f[l], this._lootModes[c])
					k = $("<a><span>" + g[c] + "</span> (" + this._lootModes[c]
							+ ")</a>"), k[0].f = h.bind(k[0], 1 << c + 2, c, 1), k
							.click(k[0].f), c == 0
							&& (m = h.bind(k[0], 1 << c + 2, c, 0)), (c < -1 || c > 2)
							&& k.addClass("icon-heroic"), b
							.push($('<span class="indicator-mode"></span>')
									.append(k).append($("<b"
											+ (c < -1 || c > 2
													? ' class="icon-heroic"'
													: "") + ">" + g[c] + " ("
											+ this._lootModes[c] + ")</b>"))), e
							&& e[1] == g_urlize(g[c].replace(" ", ""))
							&& k[0].f();
			e = !1;
			c = 0;
			for (o = b.length; c < o; ++c)
				k = $("a", b[c]), !$("span", k).html() && b.length == 3
						? e = !0
						: this.createIndicator(b[c], null, k[0].f);
			e && m();
			$(this.noteTop).append($('<div class="clear"></div>'))
		}
	},
	filterMode : function(b, c, e) {
		if (c != null && b.count != null) {
			if (b._count == null)
				b._count = b.count;
			var f = b._count;
			if (e != null && b.modes[e])
				f = b.modes[e].count, c = b.modes[e].outof;
			b.__tr = null;
			b.count = f;
			b.outof = c;
			b.percent = c ? f / c * 100 : f
		}
		return e != null ? (!b.modes || b.modes.mode == 4) && b.classs != 12
				&& b.percent < 1 ? e == 32 : b.modes && b.modes.mode & e : !0
	},
	initSubclassFilter : function(b) {
		b = b.classs || 0;
		if (this._itemClasses == null)
			this._itemClasses = {};
		this._itemClasses[b] == null && (this._itemClasses[b] = 0);
		this._itemClasses[b]++
	},
	addSubclassIndicator : function() {
		var b = location.hash.match(/:type=([^:]+)/), c = [], e;
		for (e in g_item_classes)
			c.push({
						i : e,
						n : g_item_classes[e]
					});
		c.sort(function(b, c) {
					return $WH.strcmp(b.n, c.n)
				});
		var f = function(b, c) {
			g_setSelectedLink(this, "itemclass");
			g.customPound = g.id + (b != null ? ":type=" + b : "");
			g.customFilter = function(c) {
				return b == null || b == c.classs
			};
			g.updateFilters(1);
			g.applySort();
			g.refreshRows();
			c && g.updatePound(1)
		}, g = this, h = [], j;
		j = $("<a><span>" + LANG.pr_note_all + "</span></a>");
		j[0].f = f.bind(j[0], null, 1);
		j.click(j[0].f);
		f.bind(j[0], null, 0)();
		h.push($('<span class="indicator-mode"></span>').append(j)
				.append($("<b>" + LANG.pr_note_all + "</b>")));
		for (var k = 0, m = c.length; k < m; ++k)
			if (e = c[k].i, this._itemClasses[e])
				j = $("<a><span>" + g_item_classes[e] + "</span> ("
						+ this._itemClasses[e] + ")</a>"), j[0].f = f.bind(
						j[0], e, 1), j.click(j[0].f), h
						.push($('<span class="indicator-mode"></span>')
								.append(j)
								.append($("<b>" + g_item_classes[e] + " ("
										+ this._itemClasses[e] + ")</b>"))), b
						&& b[1] == g_urlize(e) && j[0].f();
		if (h.length > 2) {
			e = 0;
			for (m = h.length; e < m; ++e)
				this.createIndicator(h[e], null, $("a", h[e])[0].f);
			$(this.noteTop).css("padding-bottom", "12px");
			$(this.noteIndicators).append($('<div class="clear"></div>'))
					.insertAfter($(this.navTop))
		}
	},
	initStatisticFilter : function(b) {
		if (this._achievTypes == null)
			this._achievTypes = {};
		this._achievTypes[b.type] == null && (this._achievTypes[b.type] = 0);
		this._achievTypes[b.type]++
	},
	addStatisticIndicator : function() {
		var b = location.hash.match(/:type=([^:]+)/), c = [], e;
		for (e in g_achievement_types)
			c.push({
						i : e,
						n : g_achievement_types[e]
					});
		c.sort(function(b, c) {
					return $WH.strcmp(b.n, c.n)
				});
		var f = function(b, c) {
			g_setSelectedLink(this, "achievType");
			g.customPound = g.id + (b != null ? ":type=" + b : "");
			g.customFilter = function(c) {
				return b == null || b == c.type
			};
			g.updateFilters(1);
			g.applySort();
			g.refreshRows();
			c && g.updatePound(1)
		}, g = this, h = [], j;
		j = $("<a><span>" + LANG.pr_note_all + "</span></a>");
		j[0].f = f.bind(j[0], null, 1);
		j.click(j[0].f);
		f.bind(j[0], null, 0)();
		h.push($('<span class="indicator-mode"></span>').append(j)
				.append($("<b>" + LANG.pr_note_all + "</b>")));
		for (var k = 0, m = c.length; k < m; ++k)
			if (e = c[k].i, this._achievTypes[e])
				j = $("<a><span>" + g_achievement_types[e] + "</span> ("
						+ this._achievTypes[e] + ")</a>"), j[0].f = f.bind(
						j[0], e, 1), j.click(j[0].f), h
						.push($('<span class="indicator-mode"></span>')
								.append(j).append($("<b>"
										+ g_achievement_types[e] + " ("
										+ this._achievTypes[e] + ")</b>"))), b
						&& b[1] == e && j[0].f();
		if (h.length > 2) {
			e = 0;
			for (m = h.length; e < m; ++e)
				this.createIndicator(h[e], null, $("a", h[e])[0].f);
			$(this.noteTop).append($('<div class="clear"></div>'))
		}
	},
	initQuestFilter : function(b) {
		if (this._questTypes == null)
			this._questTypes = {};
		for (var c = 1; c <= 4; ++c)
			this._questTypes[c] == null && (this._questTypes[c] = 0), b._type
					&& b._type & 1 << c - 1 && this._questTypes[c]++
	},
	addQuestIndicator : function() {
		var b = location.hash.match(/:type=([^:]+)/), c = function(b, c) {
			g_setSelectedLink(this, "questType");
			e.customPound = e.id + (b != null ? ":type=" + b : "");
			e.customFilter = function(c) {
				return b == null || c._type & 1 << b - 1
			};
			e.updateFilters(1);
			e.applySort();
			e.refreshRows();
			c && e.updatePound(1)
		}, e = this, f = [], g;
		g = $("<a><span>" + LANG.pr_note_all + "</span></a>");
		g[0].f = c.bind(g[0], null, 1);
		g.click(g[0].f);
		c.bind(g[0], null, 0)();
		f.push($('<span class="indicator-mode"></span>').append(g)
				.append($("<b>" + LANG.pr_note_all + "</b>")));
		for (var h = 1; h <= 4; ++h)
			if (this._questTypes[h])
				g = $("<a><span>" + g_quest_indicators[h] + "</span> ("
						+ this._questTypes[h] + ")</a>"), g[0].f = c.bind(g[0],
						h, 1), g.click(g[0].f), f
						.push($('<span class="indicator-mode"></span>')
								.append(g).append($("<b>"
										+ g_quest_indicators[h] + " ("
										+ this._questTypes[h] + ")</b>"))), b
						&& b[1] == h && g[0].f();
		if (f.length > 2) {
			h = 0;
			for (b = f.length; h < b; ++h)
				this.createIndicator(f[h], null, $("a", f[h])[0].f);
			$(this.noteTop).css("padding-bottom", "12px");
			$(this.noteIndicators).append($('<div class="clear"></div>'))
					.insertAfter($(this.navTop))
		}
	},
	assocArrCmp : function(b, c, e) {
		if (b == null)
			return -1;
		else if (c == null)
			return 1;
		for (var f = Math.max(b.length, c.length), g = 0; g < f; ++g) {
			if (b[g] == null)
				return -1;
			else if (c[g] == null)
				return 1;
			var h = $WH.strcmp(e[b[g]], e[c[g]]);
			if (h != 0)
				return h
		}
		return 0
	},
	assocBinFlags : function(b, c) {
		var e = [], f;
		for (f in c)
			!isNaN(f) && b & 1 << f - 1 && e.push(f);
		e.sort(function(b, e) {
					return $WH.strcmp(c[b], c[e])
				});
		return e
	},
	location : function(b, c) {
		if (b.location == null)
			return -1;
		for (var e = 0, f = b.location.length; e < f; ++e) {
			e > 0 && $WH.ae(c, $WH.ct(LANG.comma));
			var g = b.location[e];
			if (g == -1)
				$WH.ae(c, $WH.ct(LANG.ellipsis));
			else {
				var h = $WH.ce("a");
				h.className = $WH.isset("g_thottbot") && g_thottbot
						? "q"
						: "q1";
				h.href = "/zone=" + g;
				$WH.ae(h, $WH.ct(g_zones[g]));
				$WH.ae(c, h)
			}
		}
	},
	arrayText : function(b, c) {
		if (b != null) {
			if (!$WH.is_array(b))
				return c[b];
			for (var e = "", f = 0, g = b.length; f < g; ++f)
				f > 0 && (e += " "), c[b[f]] && (e += c[b[f]]);
			return e
		}
	},
	createCenteredIcons : function(b, c, e, f) {
		if (b != null) {
			var g = $WH.ce("div"), h = $WH.ce("div");
			$WH.ae(document.body, g);
			if (e && (b.length != 1 || f != 2)) {
				var j = $WH.ce("div");
				j.style.position = "relative";
				j.style.width = "1px";
				var k = $WH.ce("div");
				k.className = "q0";
				k.style.position = "absolute";
				k.style.right = "2px";
				k.style.lineHeight = "26px";
				k.style.fontSize = "11px";
				k.style.whiteSpace = "nowrap";
				$WH.ae(k, $WH.ct(e));
				$WH.ae(j, k);
				$WH.ae(g, j);
				g.style.paddingLeft = $(k).width() + "px"
			}
			var m = g_items;
			f == 1 && (m = g_spells);
			for (var l = 0, o = b.length; l < o; ++l) {
				var q;
				if (b[l] == null)
					q = $WH.ce("div"), q.style.width = q.style.height = "26px";
				else {
					var v, p;
					typeof b[l] == "object"
							? (v = b[l][0], p = b[l][1])
							: v = b[l];
					q = v ? m.createIcon(v, 0, p) : Icon.create(
							"inventoryslot_empty", 0, null, "javascript:;")
				}
				if (b.length == 1 && f == 2) {
					if (v && g_items[v]) {
						$WH.ee(g);
						var j = g_items[v], r = $WH.ce("a");
						q = $WH.ce("span");
						q.style.paddingTop = "4px";
						r.href = link_178db("item", v);
						r.className = "q" + j.quality + " icontiny";
						r.style.backgroundImage = "url(" + g_staticUrl
								+ "/images/wow/icons/tiny/"
								+ j.icon.toLowerCase() + ".gif)";
						r.style.whiteSpace = "nowrap";
						$WH.st(r, j["name_" + Locale.getName()]);
						$WH.ae(q, r);
						p > 1 && $WH.ae(q, $WH.ct(" (" + p + ")"));
						if (e)
							j = $WH.ce("span"), j.className = "q0", j.style.fontSize = "11px", j.style.whiteSpace = "nowrap", $WH
									.ae(j, $WH.ct(e)), $WH.ae(g, j), q.style.paddingLeft = $(k)
									.width()
									+ "px";
						$WH.ae(g, q)
					}
				} else
					q.style.cssFloat = q.style.styleFloat = "left", $WH
							.ae(g, q), g.style.margin = "0 auto", g.style.textAlign = "left", g.style.width = 26
							* b.length + "px"
			}
			h.className = "clear";
			$WH.ae(c, g);
			$WH.ae(c, h);
			return !0
		}
	},
	createSocketedIcons : function(b, c, e, f, g) {
		for (var h = 0, j = $WH.ce("div"), k = $WH.ce("div"), m = 0, l = b.length; m < l; ++m) {
			var o, q = e[m];
			o = g_items && g_items[q] ? g_items.createIcon(q, 0) : $WH
					.isset("g_gems")
					&& g_gems && g_gems[q] ? Icon.create(g_gems[q].icon, 0,
					null, link_178db("item", q)) : Icon.create(null, 0, null,
					"javascript:;");
			o.className += " iconsmall-socket-" + g_file_gems[b[m]]
					+ (!e || !q ? "-empty" : "");
			o.style.cssFloat = o.style.styleFloat = "left";
			f && f[m] && (o.insertBefore($WH.ce("var"), o.childNodes[1]), ++h);
			$WH.ae(j, o)
		}
		j.style.margin = "0 auto";
		j.style.textAlign = "left";
		j.style.width = 26 * b.length + "px";
		k.className = "clear";
		$WH.ae(c, j);
		$WH.ae(c, k);
		if (g && h == b.length)
			j = $WH.ce("div"), j.style.paddingTop = "4px", $WH.ae(j, $WH.ct(g)), $WH
					.ae(c, j)
	},
	getItemType : function(b, c, e) {
		return e != null && g_item_subsubclasses[b] != null
				&& g_item_subsubclasses[b][c] != null ? {
			url : "/items=" + b + "." + c + "." + e,
			text : g_item_subsubclasses[b][c][e]
		} : c != null && g_item_subclasses[b] != null ? {
			url : "/items=" + b + "." + c,
			text : g_item_subclasses[b][c]
		} : {
			url : "/items=" + b,
			text : g_item_classes[b]
		}
	},
	getQuestCategory : function(b) {
		return g_quest_sorts[b]
	},
	getQuestReputation : function(b, c) {
		if (c.reprewards)
			for (var e = 0, f = c.reprewards.length; e < f; ++e)
				if (c.reprewards[e][0] == b)
					return c.reprewards[e][1]
	},
	getFactionCategory : function(b, c) {
		return b ? g_faction_categories[b] : g_faction_categories[c]
	},
	getEventNextDates : function(b, c, e, f) {
		if (typeof b != "string" || typeof c != "string")
			return [null, null];
		b = new Date(b.replace(/-/g, "/"));
		c = new Date(c.replace(/-/g, "/"));
		if (isNaN(b.getTime()) || isNaN(c.getTime()))
			return [null, null];
		f == null && (f = g_serverTime);
		var g = 0;
		if (e == -1) {
			e = new Date(f.getFullYear(), f.getMonth(), 1, b.getHours(), b
							.getMinutes(), b.getSeconds());
			for (g = 0; g < 2; ++g) {
				e.setDate(1);
				e.setMonth(e.getMonth() + g);
				var h = e.getDay(), j = 1;
				e.getYear() == 2009 && (j = 0);
				h > j && e.setDate(e.getDate() + (7 - h));
				h = new Date(e);
				h.setDate(h.getDate() + (7 - j));
				if (f.getTime() < h.getTime())
					break
			}
			g = e.getTime() - b.getTime()
		} else
			e > 0
					&& (e *= 1E3, g = Math
							.ceil((f.getTime() - c.getTime()) / e)
							* e);
		b.setTime(b.getTime() + g);
		c.setTime(c.getTime() + g);
		return [b, c]
	},
	createTextRange : function(b, c) {
		b |= 0;
		c |= 0;
		if (b > 1 || c > 1)
			return b != c && c > 0 ? b + "-" + c : b + "";
		return null
	},
	coGetColor : function(b, c) {
		if (b.user && g_customColors[b.user])
			return " comment-" + g_customColors[b.user];
		switch (c) {
			case -1 :
				var e = b.divPost.childNodes[1].className
						.match(/comment-([a-z]+)/);
				if (e != null)
					return " comment-" + e[1];
				break;
			case 3 :
			case 4 :
				if (b.roles & (U_GROUP_ADMIN | U_GROUP_BUREAU))
					return " comment-blue";
				if (b.roles & U_GROUP_GREEN_TEXT)
					return " comment-green";
				else if (b.roles & U_GROUP_VIP)
					return " comment-gold"
		}
		if (b.roles & (U_GROUP_ADMIN | U_GROUP_BUREAU))
			return " comment-blue";
		else if (b.rating >= 10)
			return " comment-green";
		else if (b.rating < 0)
			return " comment-bt";
		return ""
	},
	coToggleVis : function(b) {
		var c = g_toggleDisplay(b.divBody);
		this.firstChild.nodeValue = c
				? LANG.lvcomment_hide
				: LANG.lvcomment_show;
		b.__div.className = $WH.trim(b.__div.className.replace(
				"comment-collapsed", ""))
				+ (c ? "" : " comment-collapsed");
		c = b.divHeader.firstChild.lastChild;
		if (b.ratable)
			c.style.display = "";
		else if (b.deleted || b.purged)
			c.style.fontWeight = "normal", c.className = "q10", c.innerHTML = b.deleted
					? LANG.lvcomment_deleted
					: LANG.lvcomment_purged, c.style.display = "";
		g_toggleDisplay(b.divLinks);
		b.lastEdit != null && g_toggleDisplay(b.divLastEdit)
	},
	coDisplayRating : function(b) {
		if (typeof Listview._ratingMode == "undefined")
			Listview._ratingMode = 0;
		var c = Listview._ratingMode;
		if (c == 0)
			return b.rating < 0 ? b.rating : "+" + b.rating;
		if (c == 1) {
			for (var e = c = 0, f = 0; f < b.raters.length; f++)
				b.raters[f][1] < 0 ? c += b.raters[f][1] : e += b.raters[f][1];
			return "+" + e + " / " + c
		}
	},
	coToggleRating : function() {
		if (typeof Listview._ratingMode == "undefined")
			Listview._ratingMode = 0;
		if (++Listview._ratingMode > 1)
			Listview._ratingMode = 0;
		for (var b = 0; b < this.data.length; ++b)
			if (this.data[b].__div) {
				var c = $(".comment-rating b a span", this.data[b].__div)
						.get(0);
				if (c && c.firstChild)
					c.firstChild.nodeValue = Listview.funcBox
							.coDisplayRating(this.data[b])
			}
	},
	coRate : function(b, c) {
		if (c == 0) {
			var e = 5;
			g_user.roles & U_GROUP_ADMIN ? e = 25 : g_user.roles
					& U_GROUP_BUREAU && (e = 15);
			var f = prompt($WH.sprintf(LANG.prompt_customrating, e, e), 0);
			if (f == null)
				return;
			else
				f |= 0, f != 0 && Math.abs(f) <= e && (c = f);
			if (c == 0)
				return
		} else
			g_user.roles & U_GROUP_COMMENTS_MODERATOR && (c *= 5);
		b.rating += c;
		b.raters.push([g_user.id, c]);
		var g = b.divHeader.firstChild;
		$WH.Tooltip.hide();
		g = g.childNodes[g.childNodes.length - 3];
		$WH.ge("commentrating" + b.id).firstChild.nodeValue = Listview.funcBox
				.coDisplayRating(b);
		$WH.de(g.nextSibling);
		$WH.de(g.nextSibling);
		$.get("/comment=rate&id=" + b.id + "&rating=" + c, null, function(b) {
					b != "0"
							&& (b == "1"
									? $(g).html(LANG.tooltip_banned_rating)
									: b == "3"
											? $(g)
													.html(LANG.tooltip_too_many_votes)
											: $(g).html(LANG.genericerror));
					AchievementCheck()
				})
	},
	coDelete : function(b) {
		b.purged
				? alert(LANG.message_cantdeletecomment)
				: confirm(LANG.confirm_deletecomment)
						&& (new Ajax("/comment=delete&id=" + b.id), this
								.deleteRows([b]))
	},
	coDetach : function(b) {
		if (b.replyTo == 0)
			alert(LANG.message_cantdetachcomment);
		else if (confirm(LANG.confirm_detachcomment))
			new Ajax("/comment=detach&id=" + b.id), b.replyTo = 0, alert(LANG.message_commentdetached)
	},
	coEdit : function(b, c) {
		b.divBody.style.display = "none";
		b.divResponse.style.display = "none";
		b.divLinks.firstChild.style.display = "none";
		var e = $("<div/>");
		e.addClass("comment-edit");
		b.divEdit = e[0];
		if (c == -1 && g_users[b.user] != null)
			b.roles = g_users[b.user].roles;
		var f = Listview.funcBox.coEditAppend(e, b, c), g = $("<div/>");
		g.addClass("comment-edit-buttons");
		var h = $("<button/>", {
					text : LANG.compose_save
				});
		h.click(Listview.funcBox.coEditButton.bind(h[0], b, !0, c));
		g.append(h);
		g.append($WH.ct(" "));
		h = $("<button/>", {
					text : LANG.compose_cancel
				});
		h.click(Listview.funcBox.coEditButton.bind(h[0], b, !1, c));
		g.append(h);
		e.append(g);
		e.insertAfter(b.divBody);
		f.focus()
	},
	coEditAppend : function(b, c, e, f) {
		var g = Listview.funcBox.coGetCharLimit(e);
		if (e == 1 || e == 3 || e == 4)
			c.user = g_user.name, c.roles = g_user.roles, c.rating = 1;
		else if (e == 2)
			c.roles = g_user.roles, c.rating = 1;
		f && (c.roles &= ~U_GROUP_PENDING);
		if (e == -1 || e == 0) {
			f = $("<div/>", {
						text : LANG.compose_mode
					});
			f.addClass("comment-edit-modes");
			var h = $("<a/>", {
						href : "javascript:;",
						text : LANG.compose_edit
					});
			h.click(Listview.funcBox.coModeLink.bind(h[0], 1, e, c));
			h.addClass("selected");
			f.append(h);
			f.append($WH.ct("|"));
			h = $("<a/>", {
						href : "javascript:;",
						text : LANG.compose_preview
					});
			h.click(Listview.funcBox.coModeLink.bind(h[0], 2, e, c));
			f.append(h);
			b.append(f)
		}
		var j = $("<div/>", {
					css : {
						display : "none"
					}
				});
		j.addClass("text comment-body" + Listview.funcBox.coGetColor(c, e));
		f = $("<div/>");
		f.addClass("comment-edit-body");
		h = $('<div style="float: left" />');
		h.addClass("toolbar");
		var k = $('<div style="float: left; padding: 4px 0 0 5px" />');
		k.addClass("menu-buttons");
		var m = $("<textarea/>", {
					val : c.body,
					rows : 10
				});
		m.addClass("comment-editbox");
		switch (e) {
			case 1 :
				m.attr("name", "commentbody");
				m.focus(g_revealCaptcha.bind(null, "klrbetkjerbt46", !1));
				break;
			case 2 :
				m.attr({
							name : "desc",
							originalValue : c.body
						});
				break;
			case 3 :
				m.attr("name", "body");
				m.focus(g_revealCaptcha.bind(null, "klrbetkjerbt46", !1));
				break;
			case 4 :
				m.attr({
							name : "sig",
							originalValue : c.body,
							rows : 3
						}), m.css("height", "auto")
		}
		if (e != -1 && e != 0) {
			var l = $("<h3/>"), o = $("<a/>"), q = $("<div/>"), v = $("<div/>"), p = screen.availWidth <= 480, r = Listview.funcBox.coLivePreview
					.bind(m[0], c, e, q[0]);
			o.addClass("disclosure-" + (p ? "off" : "on"));
			o.text(LANG.compose_livepreview);
			l.append(o);
			o.attr("href", "javascript:;");
			o.click(function() {
						r(1);
						var b = g_toggleDisplay(q);
						o.toggleClass("disclosure-on", b);
						o.toggleClass("disclosure-off", !b)
					});
			l.addClass("first");
			v.addClass("pad");
			j.append(l);
			j.append(q);
			j.append(v);
			g_onAfterTyping(m[0], r, 50);
			m.focus(function() {
						r();
						j.css("display", p ? "none" : "");
						e != 4 && m.css("height", "22em")
					})
		} else
			e != 4 && m.focus(function() {
						m.css("height", "22em")
					});
		for (var l = [{
					id : "b",
					title : LANG.markup_b,
					pre : "[b]",
					post : "[/b]"
				}, {
					id : "i",
					title : LANG.markup_i,
					pre : "[i]",
					post : "[/i]"
				}, {
					id : "u",
					title : LANG.markup_u,
					pre : "[u]",
					post : "[/u]"
				}, {
					id : "s",
					title : LANG.markup_s,
					pre : "[s]",
					post : "[/s]"
				}, {
					id : "small",
					title : LANG.markup_small,
					pre : "[small]",
					post : "[/small]"
				}, {
					id : "url",
					title : LANG.markup_url,
					nopending : !0,
					onclick : function() {
						var b = prompt(LANG.prompt_linkurl, "http://");
						b && g_insertTag(m[0], "[url=" + b + "]", "[/url]")
					}
				}, {
					id : "quote",
					title : LANG.markup_quote,
					pre : "[quote]",
					post : "[/quote]"
				}, {
					id : "code",
					title : LANG.markup_code,
					pre : "[code]",
					post : "[/code]"
				}, {
					id : "ul",
					title : LANG.markup_ul,
					pre : "[ul]\n[li]",
					post : "[/li]\n[/ul]",
					rep : function(b) {
						return b.replace(/\n/g, "[/li]\n[li]")
					}
				}, {
					id : "ol",
					title : LANG.markup_ol,
					pre : "[ol]\n[li]",
					post : "[/li]\n[/ol]",
					rep : function(b) {
						return b.replace(/\n/g, "[/li]\n[li]")
					}
				}, {
					id : "li",
					title : LANG.markup_li,
					pre : "[li]",
					post : "[/li]"
				}], v = 0, t = l.length; v < t; ++v) {
			var z = l[v];
			if (e == 4 && z.id == "quote")
				break;
			if (!(g_user.roles & U_GROUP_PENDING && z.nopending)) {
				var u = $("<button/>", {
							click : function(b, c) {
								c.preventDefault();
								(b.onclick != null ? b.onclick : g_insertTag
										.bind(0, m[0], b.pre, b.post, b.rep))()
							}.bind(null, z)
						});
				u[0].setAttribute("type", "button");
				var D = $("<img/>");
				u.attr("title", z.title);
				D.attr("src", g_staticUrl + "/images/deprecated/pixel.gif");
				D.addClass("toolbar-" + z.id);
				u.append(D);
				h.append(u)
			}
		}
		l = function(b, c) {
			var e = prompt($WH.sprintf(LANG.markup_prompt, b), "");
			e != null
					&& g_insertTag(m[0], "[" + c + "=" + (parseInt(e) || 0)
									+ "]", "")
		};
		l = [[
				0,
				LANG.markup_links,
				,
				[
						[9, LANG.types[10][0] + "...",
								l.bind(null, LANG.types[10][1], "achievement")],
						[11, LANG.types[13][0] + "...",
								l.bind(null, LANG.types[13][1], "class")],
						[7, LANG.types[8][0] + "...",
								l.bind(null, LANG.types[8][1], "faction")],
						[0, LANG.types[3][0] + "...",
								l.bind(null, LANG.types[3][1], "item")],
						[1, LANG.types[4][0] + "...",
								l.bind(null, LANG.types[4][1], "itemset")],
						[2, LANG.types[1][0] + "...",
								l.bind(null, LANG.types[1][1], "npc")],
						[3, LANG.types[2][0] + "...",
								l.bind(null, LANG.types[2][1], "object")],
						[8, LANG.types[9][0] + "...",
								l.bind(null, LANG.types[9][1], "pet")],
						[4, LANG.types[5][0] + "...",
								l.bind(null, LANG.types[5][1], "quest")],
						[12, LANG.types[14][0] + "...",
								l.bind(null, LANG.types[14][1], "race")],
						[13, LANG.types[15][0] + "...",
								l.bind(null, LANG.types[15][1], "skill")],
						[5, LANG.types[6][0] + "...",
								l.bind(null, LANG.types[6][1], "spell")],
						[6, LANG.types[7][0] + "...",
								l.bind(null, LANG.types[7][1], "zone")]]]];
		Menu.addButtons(k[0], l);
		f.append(h);
		f.append(k);
		f.append(m);
		f.append($("<br/>"));
		e == 4 ? f.append($WH.ct($WH.sprintf(LANG.compose_limit2, g, 3))) : f
				.append($WH.ct($WH.sprintf(LANG.compose_limit, g)));
		h = $('<span class="comment-remaining"> '
				+ $WH.sprintf(LANG.compose_remaining, g - c.body.length)
				+ "</span>");
		f.append(h);
		m.keyup(Listview.funcBox.coUpdateCharLimit.bind(0, m, h, g));
		m.keydown(Listview.funcBox.coUpdateCharLimit.bind(0, m, h, g));
		if ((e == -1 || e == 0) && g_user.roles & U_GROUP_MODERATOR)
			g = $("<div/>", {
						"class" : "pad"
					}), h = $("<div/>", {
						text : (g_user.roles & U_GROUP_ADMIN
								? "Admin"
								: "Moderator")
								+ " response"
					}), c = $("<textarea/>", {
						val : c.response,
						rows : 3,
						css : {
							height : "6em"
						}
					}), f.append(g), f.append(h), f.append(c);
		b.append(f);
		b.append($("<br/>"));
		b.append(j);
		return m
	},
	coLivePreview : function(b, c, e, f) {
		if (!(f != 1 && e.style.display == "none")) {
			f = Listview.funcBox.coGetCharLimit(c);
			f = this.value.length > f ? this.value.substring(0, f) : this.value;
			if (c == 4) {
				var g;
				if ((g = f.indexOf("\n")) != -1
						&& (g = f.indexOf("\n", g + 1)) != -1
						&& (g = f.indexOf("\n", g + 1)) != -1)
					f = f.substring(0, g)
			}
			c = Markup.rolesToClass(b.roles);
			b = Markup.toHtml(f, {
						allow : c,
						mode : Markup.MODE_COMMENT,
						roles : b.roles
					});
			e.innerHTML = b ? b : '<span class="q6">...</span>'
		}
	},
	coEditButton : function(b, c, e) {
		if (c) {
			var c = $WH.gE(b.divEdit, "textarea"), f = c[0];
			if (!Listview.funcBox.coValidate(f, e))
				return;
			if (f.value != b.body || c[1] && c[1].value != b.response) {
				var g = 0;
				b.lastEdit != null && (g = b.lastEdit[1]);
				++g;
				b.lastEdit = [g_serverTime, g, g_user.name];
				Listview.funcBox.coUpdateLastEdit(b);
				var g = Listview.funcBox.coGetCharLimit(e), h = Markup
						.rolesToClass(b.roles);
				b.divBody.innerHTML = Markup.toHtml(f.value.length > g
								? f.value.substring(0, g)
								: f.value, {
							allow : h,
							mode : Markup.MODE_COMMENT,
							roles : b.roles
						});
				b.divResponse.innerHTML = c[1] && c[1].value.length > 0
						? Markup.toHtml("[div][/div][wowheadresponse="
										+ g_user.name + " roles="
										+ g_user.roles + "]" + c[1].value
										+ "[/wowheadresponse]", {
									allow : Markup.CLASS_STAFF,
									mode : Markup.MODE_COMMENT,
									roles : g_user.roles
								})
						: "";
				b.body = f.value;
				if (g_user.roles & U_GROUP_MODERATOR && c[1])
					b.response = c[1].value;
				c = "body=" + $WH.urlencode(b.body);
				b.response !== void 0
						&& (c += "&response=" + $WH.urlencode(b.response));
				e == -1 ? new Ajax("/forums=editpost&id=" + b.id, {
							method : "POST",
							params : c
						}) : new Ajax("/comment=edit&id=" + b.id, {
							method : "POST",
							params : c
						})
			}
		}
		b.divBody.style.display = "";
		b.divResponse.style.display = "";
		b.divLinks.firstChild.style.display = "";
		$WH.de(b.divEdit);
		b.divEdit = null
	},
	coGetCharLimit : function(b) {
		if (b == 2)
			return 7500;
		if (b == 4)
			return 250;
		if (g_user.roles & U_GROUP_STAFF)
			return 16E6;
		var c = 1;
		g_user.premium && (c = 3);
		switch (b) {
			case 0 :
			case 1 :
				return 7500 * c;
			case -1 :
			case 3 :
				return 15E3 * c
		}
	},
	coUpdateCharLimit : function(b, c, e) {
		var f = $(b).val();
		f.length > e ? $(b).val(f.substring(0, e)) : ($(c).html(" "
				+ $WH.sprintf(LANG.compose_remaining, e - f.length))
				.removeClass("q10"), f.length == e && $(c).addClass("q10"))
	},
	coModeLink : function(b, c, e) {
		var f = Listview.funcBox.coGetCharLimit(c), g = Markup.MODE_COMMENT;
		$WH.array_walk($WH.gE(this.parentNode, "a"), function(b) {
					b.className = ""
				});
		this.className = "selected";
		var h = $WH.gE(this.parentNode.parentNode, "textarea"), j = h[0], k = j.parentNode, m = $(
				".comment-body", k.parentNode)[0];
		if (c == 4)
			g = Markup.MODE_SIGNATURE;
		switch (b) {
			case 1 :
				k.style.display = "";
				m.style.display = "none";
				k.firstChild.focus();
				break;
			case 2 :
				k.style.display = "none";
				b = j.value.length > f ? j.value.substring(0, f) : j.value;
				if (c == 4) {
					var l;
					if ((l = b.indexOf("\n")) != -1
							&& (l = b.indexOf("\n", l + 1)) != -1
							&& (l = b.indexOf("\n", l + 1)) != -1)
						b = b.substring(0, l)
				}
				c = Markup.rolesToClass(e.roles);
				e = Markup.toHtml(b, {
							allow : c,
							mode : g,
							roles : e.roles
						});
				h[1]
						&& h[1].value.length > 0
						&& (e += Markup.toHtml("[div][/div][wowheadresponse="
										+ g_user.name + " roles="
										+ g_user.roles + "]" + h[1].value
										+ "[/wowheadresponse]", {
									allow : Markup.CLASS_STAFF,
									mode : g,
									roles : g_user.roles
								}));
				m.innerHTML = e;
				m.style.display = ""
		}
	},
	coReply : function(b) {
		document.forms.addcomment.elements.replyto.value = b.replyTo;
		var c = $WH.ge("gjkdlfgkjh436");
		$WH.gE(c, "span")[0].innerHTML = b.user;
		c.style.display = "";
		co_addYourComment()
	},
	coValidate : function(b, c) {
		c |= 0;
		if (c == 1 || c == -1) {
			if ($WH.trim(b.value).length < 1)
				return alert(LANG.message_forumposttooshort), !1
		} else if ($WH.trim(b.value).length < 1)
			return alert(LANG.message_commenttooshort), !1;
		var e = Listview.funcBox.coGetCharLimit(c);
		if (b.value.length > e
				&& !confirm($WH.sprintf(c == 1
								? LANG.confirm_forumposttoolong
								: LANG.confirm_commenttoolong, e, b.value
								.substring(e - 30, e))))
			return !1;
		return !0
	},
	coCustomRatingOver : function(b) {
		$WH.Tooltip.showAtCursor(b, LANG.tooltip_customrating, 0, 0, "q")
	},
	coPlusRatingOver : function(b) {
		$WH.Tooltip.showAtCursor(b, LANG.tooltip_uprate, 0, 0, "q2")
	},
	coMinusRatingOver : function(b) {
		$WH.Tooltip.showAtCursor(b, LANG.tooltip_downrate, 0, 0, "q10")
	},
	coSortDate : function(b) {
		b.nextSibling.nextSibling.className = "";
		b.className = "selected";
		this.mainDiv.className += " listview-aci";
		this.setSort([1], !0, !1);
		g_setWowheadCookie("temp_comment_sort", 1)
	},
	coSortHighestRatedFirst : function(b) {
		b.previousSibling.previousSibling.className = "";
		b.className = "selected";
		this.mainDiv.className = this.mainDiv.className.replace("listview-aci",
				"");
		this.setSort([-3, 2], !0, !1);
		g_setWowheadCookie("temp_comment_sort", 2)
	},
	coFilterByPatchVersion : function(b) {
		this.minPatchVersion = b.value;
		this.refreshRows()
	},
	coUpdateLastEdit : function(b) {
		var c = b.divLastEdit;
		if (c)
			if (b.lastEdit != null) {
				var e = b.lastEdit;
				c.childNodes[1].firstChild.nodeValue = e[2];
				c.childNodes[1].href = "/user=" + e[2];
				var f = new Date(e[0]), g = (g_serverTime - f) / 1E3;
				c.childNodes[3].firstChild
						&& $WH.de(c.childNodes[3].firstChild);
				Listview.funcBox.coFormatDate(c.childNodes[3], g, f);
				g = "";
				b.rating != null
						&& (g += $WH.sprintf(LANG.lvcomment_patch,
								g_getPatchVersion(f)));
				e[1] > 1
						&& (g += LANG.dash
								+ $WH.sprintf(LANG.lvcomment_nedits, e[1]));
				c.childNodes[4].nodeValue = g;
				c.style.display = ""
			} else
				c.style.display = "none"
	},
	coFormatDate : function(b, c, e, f, g) {
		var h = new Date, j = new Date;
		j.setTime(h.getTime() - 1E3 * c);
		var k = new Date(j.getYear(), j.getMonth(), j.getDate()), k = (new Date(
				h.getYear(), h.getMonth(), h.getDate())).getTime()
				- k.getTime();
		k /= 1E3;
		k /= 86400;
		k = Math.round(k);
		if (c >= 2592E3)
			c = LANG.date_on + g_formatDateSimple(e, f);
		else if (k > 1) {
			if (c = $WH.sprintf(LANG.ddaysago, k), b)
				j = new Date, j.setTime(e.getTime()
						+ (g_localTime - g_serverTime)), b.className += $WH
						.isset("g_thottbot")
						&& g_thottbot ? "" : " tip", b.title = j
						.toLocaleString()
		} else if (c >= 43200 ? (c = h.getDay() == j.getDay()
				? LANG.today
				: LANG.yesterday, c = g_formatTimeSimple(j, c)) : c = $WH
				.sprintf(LANG.date_ago, g_formatTimeElapsed(c)), b)
			j = new Date, j.setTime(e.getTime() + (g_localTime - g_serverTime)), b.className += " tip", b.title = j
					.toLocaleString();
		g == 1 && (c = c.substr(0, 1).toUpperCase() + c.substr(1));
		e = $WH.ct(c);
		if (b)
			$WH.ae(b, e);
		else
			return c
	},
	coFormatFileSize : function(b) {
		for (var c = -1; b >= 1024 && c < 7;)
			b /= 1024, ++c;
		return c < 0 ? b + " byte" + (b > 1 ? "s" : "") : b.toFixed(1) + " "
				+ "KMGTPEZY"[c] + "B"
	},
	dateEventOver : function(b, c, e) {
		var f = Listview.funcBox.getEventNextDates(c.startDate, c.endDate,
				c.rec || 0, b), g = "";
		if (f[0] && f[1]) {
			var g = new Date(c.startDate.replace(/-/g, "/")), h = new Date(c.endDate
					.replace(/-/g, "/")), j, k;
			g.setFullYear(b.getFullYear(), b.getMonth(), b.getDate());
			h.setFullYear(b.getFullYear(), b.getMonth(), b.getDate());
			b.getFullYear() == f[0].getFullYear()
					&& b.getMonth() == f[0].getMonth()
					&& b.getDate() == f[0].getDate() && (j = !0);
			b.getFullYear() == f[1].getFullYear()
					&& b.getMonth() == f[1].getMonth()
					&& b.getDate() == f[1].getDate() && (k = !0);
			g = j && k ? g_formatTimeSimple(g, LANG.lvscreenshot_from, 1) + " "
					+ g_formatTimeSimple(h, LANG.date_to, 1) : j
					? g_formatTimeSimple(g, LANG.tab_starts)
					: k ? g_formatTimeSimple(h, LANG.tab_ends) : LANG.allday
		}
		$WH.Tooltip.showAtCursor(e, '<span class="q1">' + c.name
						+ "</span><br />" + g, 0, 0, "q")
	},
	ssCellOver : function() {
		this.className = "screenshot-caption-over"
	},
	ssCellOut : function() {
		this.className = "screenshot-caption"
	},
	ssCellClick : function(b, c) {
		c = $WH.$E(c);
		if (!c.shiftKey && !c.ctrlKey) {
			for (var e = c._target; e;) {
				if (e.nodeName == "A")
					return;
				if (e.nodeName == "IMG")
					break;
				e = e.parentNode
			}
			ScreenshotViewer.show({
						screenshots : this.data,
						pos : b
					})
		}
	},
	ssCreateCb : function(b, c) {
		if (!c.__nochk) {
			var e = $WH.ce("div");
			e.className = "listview-cb";
			e.onclick = Listview.cbCellClick;
			var f = $WH.ce("input");
			f.type = "checkbox";
			f.onclick = Listview.cbClick;
			$WH.ns(f);
			if (c.__chk)
				f.checked = !0;
			c.__cb = f;
			$WH.ae(e, f);
			$WH.ae(b, e)
		}
	},
	viCellClick : function(b, c) {
		c = $WH.$E(c);
		if (!c.shiftKey && !c.ctrlKey) {
			for (var e = c._target; e;) {
				if (e.nodeName == "A")
					return;
				if (e.nodeName == "IMG")
					break;
				e = e.parentNode
			}
			VideoViewer.show({
						videos : this.data,
						pos : b
					})
		}
	},
	moneyAchievementOver : function(b) {
		$WH.Tooltip.showAtCursor(b, "<b>" + LANG.tooltip_achievementpoints
						+ "</b>", 0, 0, "q1")
	},
	moneyCurrencyOver : function(b, c, e) {
		var f = g_gatheredcurrencies[b]["name_" + Locale.getName()];
		switch (b) {
			case 395 :
				b = [[80, 16, LANG.tooltip_ppbheroic],
						[80, 23, LANG.tooltip_ppbraid],
						[85, 75, LANG.tooltip_ppbheroic]];
				break;
			case 396 :
				b = [
						[
								85,
								75,
								$WH.sprintf(LANG.pr_tt_normal,
										LANG.tooltip_ppbraid)],
						[
								85,
								105,
								$WH.sprintf(LANG.pr_tt_heroic,
										LANG.tooltip_ppbraid)]];
				break;
			default :
				b = []
		}
		if (b.length && c) {
			f += '<br /><span class="q">';
			for (var g = 0, h = b.length; g < h; ++g) {
				var j = Math.ceil(c / b[g][1]);
				g > 0 && (f += "<br />");
				f += $WH.sprintf(LANG["tooltip_pointsperboss"
								+ (j == 1 ? 1 : 2)], j, b[g][0], b[g][2])
			}
			f += "</span>"
		}
		$WH.Tooltip.showAtCursor(e, f, 0, 0, "q1")
	},
	appendMoney : function(b, c, e, f, g, h) {
		var j, k = 0, e = e == 1 || e == "alliance" ? 1 : e == 2
				|| e == "horde" ? 2 : 3;
		if (c >= 1E4)
			k = 1, j = $WH.ce("span"), j.className = "moneygold", $WH.ae(j, $WH
							.ct($WH.number_format(Math.floor(c / 1E4)))), $WH
					.ae(b, j), c %= 1E4;
		if (c >= 100)
			k ? $WH.ae(b, $WH.ct(" ")) : k = 1, j = $WH.ce("span"), j.className = "moneysilver", $WH
					.ae(j, $WH.ct(Math.floor(c / 100))), $WH.ae(b, j), c %= 100;
		if (c >= 1)
			k ? $WH.ae(b, $WH.ct(" ")) : k = 1, j = $WH.ce("span"), j.className = "moneycopper", $WH
					.ae(j, $WH.ct(c)), $WH.ae(b, j);
		if (f != null)
			for (c = 0; c < f.length; ++c) {
				k ? $WH.ae(b, $WH.ct(" ")) : k = 1;
				var m = f[c][0], l = f[c][1], o = g_items.getIcon(m);
				j = $WH.ce("a");
				j.href = link_178db("item", m);
				j.className = "moneyitem";
				j.style.backgroundImage = "url(" + g_staticUrl
						+ "/images/wow/icons/tiny/" + o.toLowerCase() + ".gif)";
				$WH.ae(j, $WH.ct(l));
				$WH.ae(b, j)
			}
		if (g != null)
			for (c = 0; c < g.length; ++c) {
				k ? $WH.ae(b, $WH.ct(" ")) : k = 1;
				f = g[c][0];
				l = g[c][1];
				o = g_gatheredcurrencies[f].icon;
				e == 3 && o[0] == o[1] && (e = 1);
				j = $WH.ce("a");
				j.href = "/currency=" + f;
				j.className = "icontinyr tip q1";
				j.style.backgroundImage = "url("
						+ icon_178db(o[e == 3 ? 1 : e - 1].toLowerCase(),
								"tiny") + ")";
				j.onmouseover = Listview.funcBox.moneyCurrencyOver
						.bind(j, f, l);
				j.onmousemove = $WH.Tooltip.cursorUpdate;
				j.onmouseout = $WH.Tooltip.hide;
				$WH.ae(b, j);
				if (e == 3)
					f = $WH.ce("span"), f.className = "icontinyr", f.style.backgroundImage = "url(http://static.wowhead.com/images/wow/icons/tiny/"
							+ o[0].toLowerCase() + ".gif)", $WH.ae(j, f), j = f;
				$WH.ae(j, $WH.ct($WH.number_format(l)))
			}
		if (h > 0)
			k && $WH.ae(b, $WH.ct(" ")), j = $WH.ce("span"), j.className = "moneyachievement tip", j.onmouseover = Listview.funcBox.moneyAchievementOver, j.onmousemove = $WH.Tooltip.cursorUpdate, j.onmouseout = $WH.Tooltip.hide, $WH
					.ae(j, $WH.ct($WH.number_format(h))), $WH.ae(b, j)
	},
	getUpperSource : function(b, c) {
		switch (b) {
			case 2 :
				if (c.bd)
					return LANG.source_bossdrop;
				if (c.z)
					return LANG.source_zonedrop;
				break;
			case 4 :
				return LANG.source_quests;
			case 5 :
				return LANG.source_vendors
		}
		return g_sources[b]
	},
	getLowerSource : function(b, c, e) {
		switch (b) {
			case 3 :
				if (c.p && g_sources_pvp[c.p])
					return {
						text : g_sources_pvp[c.p]
					}
		}
		switch (e) {
			case 0 :
			case 1 :
			case 2 :
				if (c.z) {
					e = {
						url : "/zone=" + c.z,
						text : g_zones[c.z]
					};
					if (c.t && b == 5)
						e.pretext = LANG.lvitem_vendorin;
					if (c.dd && c.dd != 99)
						e.posttext = c.dd < 0 ? $WH.sprintf(LANG.lvitem_dd, "",
								c.dd < -1
										? LANG.lvitem_heroic
										: LANG.lvitem_normal) : $WH.sprintf(
								LANG.lvitem_dd, c.dd & 1
										? LANG.lvitem_raid10
										: LANG.lvitem_raid25, c.dd > 2
										? LANG.lvitem_heroic
										: LANG.lvitem_normal);
					return e
				}
				break;
			case 5 :
				return {
					url : "/quests=" + c.c2 + "." + c.c,
					text : Listview.funcBox.getQuestCategory(c.c)
				};
			case 6 :
				return c.c && c.s ? {
					url : "/spells=" + c.c + "." + c.s,
					text : g_spell_skills[c.s]
				} : {
					url : "/spells=0",
					text : "??"
				}
		}
	},
	getExpansionText : function(b) {
		var c = "";
		b.expansion == 1 ? c += " bc" : b.expansion == 2
				? c += " wotlk wrath"
				: b.expansion == 3 && (c += " cat cata cataclysm");
		return c
	}
};
Listview.templates = {
	faction : {
		sort : [1],
		nItemsPerPage : -1,
		searchable : 1,
		filtrable : 1,
		columns : [{
					id : "name",
					name : LANG.name,
					type : "text",
					align : "left",
					value : "name",
					compute : function(b, c) {
						var e = $WH.ce("a");
						e.style.fontFamily = "Verdana, sans-serif";
						e.href = this.getItemLink(b);
						$WH.ae(e, $WH.ct(b.name));
						if (b.expansion) {
							var f = $WH.ce("span");
							f.className = g_GetExpansionClassName(b.expansion);
							$WH.ae(f, e);
							$WH.ae(c, f)
						} else
							$WH.ae(c, e)
					},
					getVisibleText : function(b) {
						return b.name + Listview.funcBox.getExpansionText(b)
					}
				}, {
					id : "side",
					name : LANG.side,
					type : "text",
					compute : function(b, c) {
						if (b.side && b.side != 3) {
							var e = $WH.ce("span");
							e.className = b.side == 1
									? "icon-alliance"
									: "icon-horde";
							e.onmouseover = function(c) {
								$WH.Tooltip.showAtCursor(c, g_sides[b.side], 0,
										0, "q")
							};
							e.onmousemove = $WH.Tooltip.cursorUpdate;
							e.onmouseout = $WH.Tooltip.hide;
							$WH.ae(c, e)
						}
					},
					getVisibleText : function(b) {
						if (b.side)
							return g_sides[b.side]
					},
					sortFunc : function(b, c) {
						return $WH.strcmp(g_sides[b.side], g_sides[c.side])
					}
				}, {
					id : "standing",
					name : LANG.reputation,
					value : "standing",
					compute : function(b, c) {
						c.style.padding = 0;
						$WH.ae(c, g_createReputationBar(b.standing))
					},
					hidden : 1
				}, {
					id : "category",
					name : LANG.category,
					type : "text",
					width : "16%",
					compute : function(b, c) {
						if (b.category2 != null) {
							c.className = $WH.isset("g_thottbot") && g_thottbot
									? "small q"
									: "small q1";
							var e = $WH.ce("a"), f = "/factions=" + b.category2;
							b.category && (f += "." + b.category);
							e.href = f;
							$WH.ae(e, $WH.ct(Listview.funcBox
											.getFactionCategory(b.category,
													b.category2)));
							$WH.ae(c, e)
						}
					},
					getVisibleText : function(b) {
						return Listview.funcBox.getFactionCategory(b.category,
								b.category2)
					},
					sortFunc : function(b, c) {
						var e = Listview.funcBox.getFactionCategory;
						return $WH.strcmp(e(b.category, b.category2), e(
										c.category, c.category2))
					}
				}],
		getItemLink : function(b) {
			return "/faction=" + b.id
		}
	},
	item : {
		sort : [1],
		searchable : 1,
		filtrable : 1,
		columns : [{
			id : "name",
			name : LANG.name,
			type : "text",
			align : "left",
			span : 2,
			value : "name",
			compute : function(b, c, e) {
				if (b.upgraded)
					e.className = "upgraded";
				var f = $WH.ce("td");
				f.style.width = "1px";
				f.style.padding = "0";
				f.style.borderRight = "none";
				var g = null, h = null;
				b.stack != null
						&& (g = Listview.funcBox.createTextRange(b.stack[0],
								b.stack[1]));
				if (b.avail != null)
					h = b.avail;
				b.id
						&& $WH.ae(f, g_items.createIcon(b.id,
										this.iconSize == null
												? 1
												: this.iconSize, g, h));
				$WH.ae(e, f);
				c.style.borderLeft = "none";
				g = $WH.ce("a");
				g.className = "q" + (7 - parseInt(b.name.charAt(0)));
				g.style.fontFamily = "Verdana, sans-serif";
				g.href = this.getItemLink(b);
				if (b.rel)
					Icon.getLink(f.firstChild).rel = b.rel, g.rel = b.rel;
				$WH.ae(g, $WH.ct(b.name.substring(1)));
				e = $WH.ce("div");
				$WH.ae(e, g);
				if (b.reqclass) {
					var j = $WH.ce("div");
					j.className = "small2";
					for (var k = Listview.funcBox.assocBinFlags(b.reqclass,
							g_chr_classes), f = 0, h = k.length; f < h; ++f)
						f > 0 && $WH.ae(j, $WH.ct(", ")), g = $WH.ce("a"), g.href = "/class="
								+ k[f], g.className = "c" + k[f], $WH.st(g,
								g_chr_classes[k[f]]), $WH.ae(j, g);
					$WH.ae(e, j)
				}
				if (typeof fi_nExtraCols == "number" && fi_nExtraCols >= 5
						&& b.source != null && b.source.length == 1) {
					b.reqclass ? $WH.ae(j, $WH.ct(LANG.dash)) : (j = $WH
							.ce("div"), j.className = "small2");
					f = b.sourcemore ? b.sourcemore[0] : {};
					h = 0;
					f.t ? (h = f.t, g = $WH.ce("a"), g.className = f.q != null
							? "q" + f.q
							: $WH.isset("g_thottbot") && g_thottbot
									? "q"
									: "q1", g.href = "/" + g_types[f.t] + "="
							+ f.ti, f.n.length <= 30
							? $WH.ae(g, $WH.ct(f.n))
							: (g.title = f.n, $WH.ae(g, $WH.ct($WH.trim(f.n
											.substr(0, 27))
											+ "..."))), $WH.ae(j, g)) : $WH.ae(
							j, $WH.ct(Listview.funcBox.getUpperSource(
									b.source[0], f)));
					f = Listview.funcBox.getLowerSource(b.source[0], f, h);
					if (f != null)
						$WH.ae(j, $WH.ct(LANG.hyphen)), f.pretext
								&& $WH.ae(j, $WH.ct(f.pretext)), f.url
								? (g = $WH.ce("a"), g.className = $WH
										.isset("g_thottbot")
										&& g_thottbot ? "q" : "q1", g.href = f.url, $WH
										.ae(g, $WH.ct(f.text)), $WH.ae(j, g))
								: $WH.ae(j, $WH.ct(f.text)), f.posttext
								&& $WH.ae(j, $WH.ct(f.posttext));
					$WH.ae(e, j)
				}
				if (b.heroic || b.reqrace) {
					e.style.position = "relative";
					j = $WH.ce("div");
					j.className = "small";
					j.style.fontStyle = "italic";
					j.style.position = "absolute";
					j.style.right = j.style.bottom = "3px";
					if (b.heroic)
						f = $WH.ce("span"), f.className = "q2", $WH.ae(f, $WH
										.ct(LANG.lvitem_heroicitem)), $WH.ae(j,
								f);
					if (b.reqrace && (b.reqrace & 1791) != 1101
							&& (b.reqrace & 1791) != 690) {
						if (b.heroic)
							$WH.ae(j, $WH.ce("br")), j.style.bottom = "-6px";
						b = Listview.funcBox.assocBinFlags(b.reqrace,
								g_chr_races);
						f = 0;
						for (h = b.length; f < h; ++f)
							f > 0 && $WH.ae(j, $WH.ct(", ")), g = $WH.ce("a"), g.href = "/race="
									+ b[f], $WH.st(g, g_chr_races[b[f]]), $WH
									.ae(j, g);
						j.className += $WH.isset("g_thottbot") && g_thottbot
								? " q"
								: " q1"
					}
					$WH.ae(e, j)
				}
				$WH.ae(c, e)
			},
			getVisibleText : function(b) {
				var c = b.name.substring(1);
				b.heroic && (c += " " + LANG.lvitem_heroicitem);
				b.reqrace
						&& (c += " "
								+ Listview.funcBox.arrayText(Listview.funcBox
												.assocBinFlags(b.reqrace,
														g_chr_races),
										g_chr_races));
				b.reqclass
						&& (c += " "
								+ Listview.funcBox.arrayText(Listview.funcBox
												.assocBinFlags(b.reqclass,
														g_chr_classes),
										g_chr_classes));
				if (typeof fi_nExtraCols == "number" && fi_nExtraCols >= 5
						&& b.source != null && b.source.length == 1) {
					var e = b.sourcemore ? b.sourcemore[0] : {}, f = 0;
					e.t ? (f = e.t, c += " " + e.n) : c += " "
							+ Listview.funcBox.getUpperSource(b.source[0], e);
					b = Listview.funcBox.getLowerSource(b.source[0], e, f);
					b != null
							&& (b.pretext && (c += " " + b.pretext), c += " "
									+ b.text, b.posttext
									&& (c += " " + b.posttext))
				}
				return c
			}
		}, {
			id : "level",
			name : LANG.level,
			type : "range",
			getMinValue : function(b) {
				return b.minlevel ? b.minlevel : b.level
			},
			getMaxValue : function(b) {
				return b.maxlevel ? b.maxlevel : b.level
			},
			compute : function(b) {
				return b.minlevel && b.maxlevel ? b.minlevel != b.maxlevel
						? b.minlevel + LANG.hyphen + b.maxlevel
						: b.minlevel : b.level
			},
			sortFunc : function(b, c, e) {
				return e > 0 ? $WH.strcmp(b.minlevel, c.minlevel)
						|| $WH.strcmp(b.maxlevel, c.maxlevel)
						|| $WH.strcmp(b.level, c.level) : $WH.strcmp(
						b.maxlevel, c.maxlevel)
						|| $WH.strcmp(b.minlevel, c.minlevel)
						|| $WH.strcmp(b.level, c.level)
			}
		}, {
			id : "reqlevel",
			name : LANG.req,
			tooltip : LANG.tooltip_reqlevel,
			value : "reqlevel",
			compute : function(b) {
				if (b.reqlevel > 1)
					return b.reqlevel
			}
		}, {
			id : "side",
			name : LANG.side,
			type : "text",
			compute : function(b, c) {
				if (b.side && b.side != 3) {
					var e = $WH.ce("span");
					e.className = b.side == 1 ? "icon-alliance" : "icon-horde";
					e.onmouseover = function(c) {
						$WH.Tooltip.showAtCursor(c, g_sides[b.side], 0, 0, "q")
					};
					e.onmousemove = $WH.Tooltip.cursorUpdate;
					e.onmouseout = $WH.Tooltip.hide;
					$WH.ae(c, e)
				}
			},
			getVisibleText : function(b) {
				if (b.side)
					return g_sides[b.side]
			},
			sortFunc : function(b, c) {
				return $WH.strcmp(g_sides[b.side], g_sides[c.side])
			}
		}, {
			id : "dps",
			name : LANG.dps,
			value : "dps",
			compute : function(b) {
				return (b.dps || 0).toFixed(1)
			},
			hidden : !0
		}, {
			id : "speed",
			name : LANG.speed,
			value : "speed",
			compute : function(b) {
				return (b.speed || 0).toFixed(2)
			},
			hidden : !0
		}, {
			id : "armor",
			name : LANG.armor,
			value : "armor",
			compute : function(b) {
				if (b.armor > 0)
					return b.armor
			},
			hidden : !0
		}, {
			id : "slot",
			name : LANG.slot,
			type : "text",
			compute : function(b, c) {
				$WH.nw(c);
				return g_item_slots[b.slot]
			},
			getVisibleText : function(b) {
				return g_item_slots[b.slot]
			},
			sortFunc : function(b, c) {
				return $WH.strcmp(g_item_slots[b.slot], g_item_slots[c.slot])
			}
		}, {
			id : "slots",
			name : LANG.slots,
			value : "nslots",
			hidden : !0
		}, {
			id : "skill",
			name : LANG.skill,
			value : "skill",
			hidden : !0
		}, {
			id : "glyph",
			name : LANG.glyphtype,
			type : "text",
			value : "glyph",
			compute : function(b) {
				if (b.glyph)
					return g_item_glyphs[b.glyph]
			},
			getVisibleText : function(b) {
				return g_item_glyphs[b.glyph]
			},
			sortFunc : function(b, c) {
				return $WH.strcmp(g_item_glyphs[b.glyph],
						g_item_glyphs[c.glyph])
			},
			hidden : !0
		}, {
			id : "source",
			name : LANG.source,
			type : "text",
			compute : function(b, c) {
				if (this.iconSize == 0)
					c.className = "small";
				if (b.source != null)
					if (b.source.length == 1) {
						$WH.nw(c);
						var e = b.sourcemore ? b.sourcemore[0] : {}, f = 0;
						if (e.t) {
							var f = e.t, g = $WH.ce("a");
							g.className = e.q != null ? "q" + e.q : $WH
									.isset("g_thottbot")
									&& g_thottbot ? "q" : "q1";
							g.href = "/" + g_types[e.t] + "=" + e.ti;
							g.style.whiteSpace = "nowrap";
							if (e.icon)
								g.className += " icontiny", g.style.backgroundImage = 'url("'
										+ g_staticUrl
										+ "/images/wow/icons/tiny/"
										+ e.icon.toLowerCase() + '.gif")';
							$WH.ae(g, $WH.ct(e.n));
							$WH.ae(c, g)
						} else
							$WH.ae(c, $WH.ct(Listview.funcBox.getUpperSource(
											b.source[0], e)));
						e = Listview.funcBox.getLowerSource(b.source[0], e, f);
						if (this.iconSize != 0 && e != null)
							f = $WH.ce("div"), f.className = "small2", e.pretext
									&& $WH.ae(f, $WH.ct(e.pretext)), e.url
									? (g = $WH.ce("a"), g.className = $WH
											.isset("g_thottbot")
											&& g_thottbot ? "q" : "q1", g.href = e.url, $WH
											.ae(g, $WH.ct(e.text)), $WH
											.ae(f, g))
									: $WH.ae(f, $WH.ct(e.text)), e.posttext
									&& $WH.ae(f, $WH.ct(e.posttext)), $WH.ae(c,
									f)
					} else {
						g = "";
						e = 0;
						for (f = b.source.length; e < f; ++e)
							e > 0 && (g += LANG.comma), g += g_sources[b.source[e]];
						return g
					}
			},
			getVisibleText : function(b) {
				if (b.source != null)
					if (b.source.length == 1) {
						var c = "", e = b.sourcemore ? b.sourcemore[0] : {}, f = 0;
						e.t ? (f = e.t, c += " " + e.n) : c += " "
								+ Listview.funcBox.getUpperSource(b.source[0],
										e);
						b = Listview.funcBox.getLowerSource(b.source[0], e, f);
						b != null
								&& (b.pretext && (c += " " + b.pretext), c += " "
										+ b.text, b.posttext
										&& (c += " " + b.posttext));
						return c
					} else
						return Listview.funcBox.arrayText(b.source, g_sources)
			},
			sortFunc : function(b, c) {
				var e = Listview.funcBox.assocArrCmp(b.source, c.source,
						g_sources);
				if (e != 0)
					return e;
				return $WH.strcmp(b.sourcemore && b.source.length == 1
								? b.sourcemore[0].n
								: null, c.sourcemore && c.source.length == 1
								? c.sourcemore[0].n
								: null)
			}
		}, {
			id : "type",
			name : LANG.type,
			type : "text",
			compute : function(b, c) {
				c.className = $WH.isset("g_thottbot") && g_thottbot
						? "small q"
						: "small q1";
				$WH.nw(c);
				var e = $WH.ce("a"), f = Listview.funcBox.getItemType(b.classs,
						b.subclass, b.subsubclass);
				e.href = f.url;
				$WH.ae(e, $WH.ct(f.text));
				$WH.ae(c, e)
			},
			getVisibleText : function(b) {
				return Listview.funcBox.getItemType(b.classs, b.subclass,
						b.subsubclass).text
			},
			sortFunc : function(b, c) {
				var e = Listview.funcBox.getItemType;
				return $WH.strcmp(e(b.classs, b.subclass, b.subsubclass).text,
						e(c.classs, c.subclass, c.subsubclass).text)
			}
		}],
		getItemLink : function(b) {
			return b.id
		},
		onBeforeCreate : function() {
			for (var b = !1, c = 0, e = this.data.length; c < e; ++c) {
				var f = this.data[c];
				f.slot > 0 && f.slot != 18
						|| $WH.in_array(ModelViewer.validSlots, f.slotbak) >= 0
						&& f.displayid > 0 || f.modelviewer
						? ++b
						: f.__nochk = 1
			}
			if (b > 0)
				this.mode = 1, this._nComparable = b
		},
		createCbControls : function(b, c) {
			if (c || !(this._nComparable < 15)) {
				var e = $WH.ce("input"), f = $WH.ce("input"), g = $WH
						.ce("input"), h = $WH.ce("input"), j = g_user.characters
						? $WH.array_filter(g_user.characters, function(b) {
									return b.pinned
								})
						: !1;
				e.type = f.type = g.type = h.type = "button";
				e.value = LANG.button_compare;
				f.value = LANG.button_viewin3d;
				g.value = LANG.button_equip;
				h.value = LANG.button_deselect;
				e.onclick = this.template.compareItems.bind(this);
				f.onclick = this.template.viewIn3d.bind(this);
				h.onclick = Listview.cbSelect.bind(this, !1);
				if (this._nComparable == 0
						|| typeof this._nComparable == "undefined")
					e.disabled = "disabled", f.disabled = "disabled", g.disabled = "disabled", h.disabled = "disabled", j = !1;
				$WH.ae(b, e);
				$WH.ae(b, f);
				if (j && j.length)
					g.onclick = this.template.equipItems.bind(this, j[0]), $WH
							.ae(b, g);
				$WH.ae(b, h)
			}
		},
		compareItems : function() {
			var b = this.getCheckedRows();
			if (b.length) {
				var c = "";
				$WH.array_walk(b, function(b) {
							b.slot == 0 || b.slot == 18 || (c += b.id + ";")
						});
				su_addToSaved($WH.rtrim(c, ";"), b.length)
			}
		},
		viewIn3d : function() {
			var b = this.getCheckedRows();
			if (b.length) {
				var c = !1, e = !1, f = !1, g = {}, h = null;
				$WH.array_walk(b, function(b) {
							if ($WH.in_array(ModelViewer.validSlots, b.slotbak) >= 0
									&& b.displayid > 0) {
								var j = ModelViewer.slotMap[b.slotbak];
								g[j] && (e = !0);
								g[j] = b.displayid;
								c = !0
							} else
								b.modelviewer ? h = b.modelviewer : f = !0
						});
				b = null;
				if (h) {
					if (c || f)
						b = LANG.dialog_cantdisplay;
					ModelViewer.show({
								type : h.type,
								displayId : h.displayid,
								slot : h.slot,
								message : b
							})
				} else {
					if (e || f)
						b = LANG.dialog_cantdisplay;
					var j = [], k;
					for (k in g)
						j.push(parseInt(k)), j.push(g[k]);
					j.length > 0 ? ModelViewer.show({
								type : 4,
								equipList : j,
								message : b
							}) : alert(LANG.message_nothingtoviewin3d)
				}
			}
		},
		equipItems : function(b) {
			var c = this.getCheckedRows();
			if (c.length) {
				var e = "";
				$WH.array_walk(c, function(b) {
							b.slot == 0 || b.slot == 18 || (e += b.id + ":")
						});
				location.href = g_getProfileUrl(b) + "&items="
						+ $WH.rtrim(e, ":")
			}
		}
	},
	itemset : {
		sort : [1],
		nItemsPerPage : 75,
		searchable : 1,
		filtrable : 1,
		columns : [{
			id : "name",
			name : LANG.name,
			type : "text",
			align : "left",
			value : "name",
			compute : function(b, c) {
				var e = $WH.ce("a");
				e.className = "q" + (7 - parseInt(b.name.charAt(0)));
				e.style.fontFamily = "Verdana, sans-serif";
				e.href = this.getItemLink(b);
				$WH.ae(e, $WH.ct(b.name.substring(1)));
				var f = $WH.ce("div");
				f.style.position = "relative";
				$WH.ae(f, e);
				if (b.heroic)
					e = $WH.ce("div"), e.className = "small q2", e.style.fontStyle = "italic", e.style.position = "absolute", e.style.right = "3px", e.style.bottom = "3px", $WH
							.ae(e, $WH.ct(LANG.lvitem_heroicitem)), $WH
							.ae(f, e);
				$WH.ae(c, f);
				if (b.note)
					e = $WH.ce("div"), e.className = "small", $WH.ae(e, $WH
									.ct(g_itemset_notes[b.note])), $WH.ae(c, e)
			},
			getVisibleText : function(b) {
				var c = b.name.substring(1);
				b.note && (c += " " + g_itemset_notes[b.note]);
				return c
			}
		}, {
			id : "level",
			name : LANG.level,
			type : "range",
			getMinValue : function(b) {
				return b.minlevel
			},
			getMaxValue : function(b) {
				return b.maxlevel
			},
			compute : function(b) {
				return b.minlevel > 0 && b.maxlevel > 0
						? b.minlevel != b.maxlevel ? b.minlevel + LANG.hyphen
								+ b.maxlevel : b.minlevel
						: -1
			},
			sortFunc : function(b, c, e) {
				return e > 0 ? $WH.strcmp(b.minlevel, c.minlevel)
						|| $WH.strcmp(b.maxlevel, c.maxlevel) : $WH.strcmp(
						b.maxlevel, c.maxlevel)
						|| $WH.strcmp(b.minlevel, c.minlevel)
			}
		}, {
			id : "pieces",
			name : LANG.pieces,
			getValue : function(b) {
				return b.pieces.length
			},
			compute : function(b, c) {
				c.style.padding = "0";
				Listview.funcBox.createCenteredIcons(b.pieces, c)
			},
			sortFunc : function(b, c) {
				return $WH.strcmp(b.pieces != null ? b.pieces.length : 0,
						c.pieces != null ? c.pieces.length : 0)
			}
		}, {
			id : "type",
			name : LANG.type,
			type : "text",
			compute : function(b) {
				return g_itemset_types[b.type]
			},
			sortFunc : function(b, c) {
				return $WH.strcmp(g_itemset_types[b.type],
						g_itemset_types[c.type])
			}
		}, {
			id : "classes",
			name : LANG.classes,
			type : "text",
			width : "20%",
			getVisibleText : function(b) {
				var c = "";
				if (b.reqclass)
					for (var b = Listview.funcBox.assocBinFlags(b.reqclass,
							g_chr_classes), e = 0, f = b.length; e < f; ++e)
						e > 0 && (c += LANG.comma), c += g_chr_classes[b[e]];
				return c
			},
			compute : function(b, c) {
				if (b.reqclass) {
					var e = Listview.funcBox.assocBinFlags(b.reqclass,
							g_chr_classes), f = $WH.ce("div");
					f.style.width = 26 * e.length + "px";
					f.style.margin = "0 auto";
					for (var g = 0, h = e.length; g < h; ++g) {
						var j = Icon.create("class_" + g_file_classes[e[g]], 0,
								null, "/class=" + e[g]);
						j.style.cssFloat = j.style.styleFloat = "left";
						$WH.ae(f, j)
					}
					$WH.ae(c, f)
				}
			},
			sortFunc : function(b, c) {
				return Listview.funcBox.assocArrCmp(Listview.funcBox
								.assocBinFlags(b.reqclass, g_chr_classes),
						Listview.funcBox.assocBinFlags(c.reqclass,
								g_chr_classes), g_chr_classes)
			}
		}],
		getItemLink : function(b) {
			return "/itemset=" + b.id
		}
	},
	npc : {
		sort : [1],
		nItemsPerPage : 100,
		searchable : 1,
		filtrable : 1,
		columns : [{
			id : "name",
			name : LANG.name,
			type : "text",
			align : "left",
			value : "name",
			compute : function(b, c) {
				if (b.boss)
					c.className = "icon-boss-padded";
				var e = $WH.ce("a");
				e.style.fontFamily = "Verdana, sans-serif";
				e.href = this.getItemLink(b);
				$WH.ae(e, $WH.ct(b.name));
				$WH.ae(c, e);
				if (b.tag != null)
					e = $WH.ce("div"), e.className = "small", $WH.ae(e, $WH
									.ct("<" + b.tag + ">")), $WH.ae(c, e)
			},
			getVisibleText : function(b) {
				var c = b.name;
				b.tag && (c += " <" + b.tag + ">");
				b.boss && (c += " boss skull");
				return c
			},
			sortFunc : function(b, c) {
				return $WH.strcmp(c.boss, b.boss) || $WH.strcmp(b.name, c.name)
			}
		}, {
			id : "level",
			name : LANG.level,
			type : "range",
			width : "10%",
			getMinValue : function(b) {
				return b.minlevel
			},
			getMaxValue : function(b) {
				return b.maxlevel
			},
			compute : function(b, c) {
				if (b.classification) {
					var e = $WH.ce("div");
					e.className = "small";
					$WH.ae(e, $WH.ct(g_npc_classifications[b.classification]));
					$WH.ae(c, e)
				}
				if (b.classification == 3)
					return "??";
				if (b.minlevel > 0 && b.maxlevel > 0)
					return b.minlevel != b.maxlevel ? b.minlevel + LANG.hyphen
							+ b.maxlevel : b.minlevel;
				return -1
			},
			getVisibleText : function(b) {
				var c = "";
				b.classification
						&& (c += " " + g_npc_classifications[b.classification]);
				b.minlevel > 0
						&& b.maxlevel > 0
						&& (c += " ", c += b.minlevel != b.maxlevel
								? b.minlevel + LANG.hyphen + b.maxlevel
								: b.minlevel);
				return c
			},
			sortFunc : function(b, c, e) {
				return e > 0 ? $WH.strcmp(b.minlevel, c.minlevel)
						|| $WH.strcmp(b.maxlevel, c.maxlevel)
						|| $WH.strcmp(b.classification, c.classification) : $WH
						.strcmp(b.maxlevel, c.maxlevel)
						|| $WH.strcmp(b.minlevel, c.minlevel)
						|| $WH.strcmp(b.classification, c.classification)
			}
		}, {
			id : "location",
			name : LANG.location,
			type : "text",
			compute : function(b, c) {
				return Listview.funcBox.location(b, c)
			},
			getVisibleText : function(b) {
				return Listview.funcBox.arrayText(b.location, g_zones)
			},
			sortFunc : function(b, c) {
				return Listview.funcBox.assocArrCmp(b.location, c.location,
						g_zones)
			}
		}, {
			id : "react",
			name : LANG.react,
			type : "text",
			width : "10%",
			value : "react",
			filtrable : 0,
			compute : function(b, c) {
				if (b.react == null)
					return -1;
				for (var e = [LANG.lvnpc_alliance, LANG.lvnpc_horde], f = 0, g = 0; g < 2; ++g)
					if (b.react[g] != null) {
						f++ > 0 && $WH.ae(c, $WH.ct(" "));
						var h = $WH.ce("span");
						h.className = b.react[g] < 0 ? "q10" : b.react[g] > 0
								? "q2"
								: "q";
						$WH.ae(h, $WH.ct(e[g]));
						$WH.ae(c, h)
					}
			}
		}, {
			id : "skin",
			name : LANG.skin,
			type : "text",
			value : "skin",
			compute : function(b, c) {
				if (b.skin) {
					var e = $WH.ce("a");
					e.className = $WH.isset("g_thottbot") && g_thottbot
							? "q"
							: "q1";
					e.href = "/npcs?filter=cr=35;crs=0;crv=" + b.skin;
					$WH.ae(e, $WH.ct(b.skin));
					$WH.ae(c, e)
				}
			},
			hidden : 1
		}, {
			id : "petfamily",
			name : LANG.petfamily,
			type : "text",
			width : "12%",
			compute : function(b, c) {
				c.className = $WH.isset("g_thottbot") && g_thottbot
						? "q"
						: "q1";
				var e = $WH.ce("a");
				e.href = "/pet=" + b.family;
				$WH.ae(e, $WH.ct(g_pet_families[b.family]));
				$WH.ae(c, e)
			},
			getVisibleText : function(b) {
				return g_pet_families[b.family]
			},
			sortFunc : function(b, c) {
				return $WH.strcmp(g_pet_families[b.family],
						g_pet_families[c.family])
			},
			hidden : 1
		}, {
			id : "type",
			name : LANG.type,
			type : "text",
			width : "12%",
			compute : function(b, c) {
				c.className = $WH.isset("g_thottbot") && g_thottbot
						? "small q"
						: "small q1";
				var e = $WH.ce("a");
				e.href = "/npcs=" + b.type;
				$WH.ae(e, $WH.ct(g_npc_types[b.type]));
				$WH.ae(c, e)
			},
			getVisibleText : function(b) {
				return g_npc_types[b.type]
			},
			sortFunc : function(b, c) {
				return $WH.strcmp(g_npc_types[b.type], g_npc_types[c.type])
			}
		}],
		getItemLink : function(b) {
			return "/npc=" + b.id
		}
	},
	object : {
		sort : [1],
		nItemsPerPage : 100,
		searchable : 1,
		filtrable : 1,
		columns : [{
					id : "name",
					name : LANG.name,
					type : "text",
					align : "left",
					value : "name",
					compute : function(b, c) {
						var e = $WH.ce("a");
						e.style.fontFamily = "Verdana, sans-serif";
						e.href = this.getItemLink(b);
						$WH.ae(e, $WH.ct(b.name));
						$WH.ae(c, e)
					}
				}, {
					id : "location",
					name : LANG.location,
					type : "text",
					compute : function(b, c) {
						return Listview.funcBox.location(b, c)
					},
					getVisibleText : function(b) {
						return Listview.funcBox.arrayText(b.location, g_zones)
					},
					sortFunc : function(b, c) {
						return Listview.funcBox.assocArrCmp(b.location,
								c.location, g_zones)
					}
				}, {
					id : "skill",
					name : LANG.skill,
					width : "10%",
					value : "skill",
					hidden : !0
				}, {
					id : "type",
					name : LANG.type,
					type : "text",
					width : "12%",
					compute : function(b, c) {
						c.className = $WH.isset("g_thottbot") && g_thottbot
								? "small q"
								: "small q1";
						var e = $WH.ce("a");
						e.href = "/objects=" + b.type;
						$WH.ae(e, $WH.ct(g_object_types[b.type]));
						$WH.ae(c, e)
					},
					getVisibleText : function(b) {
						return g_object_types[b.type]
					},
					sortFunc : function(b, c) {
						return $WH.strcmp(g_object_types[b.type],
								g_object_types[c.type])
					}
				}],
		getItemLink : function(b) {
			return "/object=" + b.id
		}
	},
	quest : {
		sort : [1, 2],
		nItemsPerPage : 100,
		searchable : 1,
		filtrable : 1,
		columns : [{
			id : "name",
			name : LANG.name,
			type : "text",
			align : "left",
			value : "name",
			compute : function(b, c) {
				var e = $("<a/>", {
							css : {
								"font-family" : "Verdana, sans serif"
							},
							href : this.getItemLink(b),
							text : b.name
						}), f = $("<div/>");
				f.append(e);
				if (b.reqclass) {
					for (var g = $("<div/>", {
								"class" : "small2"
							}), h = Listview.funcBox.assocBinFlags(b.reqclass,
							g_chr_classes), j = 0, k = h.length; j < k; ++j)
						j > 0 && g.append(", "), e = $("<a/>", {
									href : "/class=" + h[j],
									"class" : "c" + h[j],
									text : g_chr_classes[h[j]]
								}), g.append(e);
					f.append(g)
				}
				if (b.historical || b.wflags & 32 || b.reqrace
						&& b.reqrace != -1) {
					f.css("position", "relative");
					g = $("<div/>", {
								"class" : "small",
								css : {
									"font-style" : "italic",
									position : "absolute",
									right : "3px",
									bottom : "3px",
									"text-align" : "right"
								}
							});
					b.historical && (e = $("<span/>", {
								css : {
									color : "red"
								},
								text : LANG.lvquest_removed
							}), g.append(e));
					b.wflags
							& 32
							&& (b.historical
									&& (g.append($("<br/>")), f.css("height",
											"33px")), e = $("<span/>", {
										text : LANG.lvquest_autoaccept
									}), b.wflags
									& 64
									&& e.css("color", "red").append(" "
											+ LANG.lvquest_hostile), g
									.append(e));
					if (b.reqrace && b.reqrace != -1) {
						h = Listview.funcBox.assocBinFlags(b.reqrace,
								g_chr_races);
						if (h.length && (b.historical || b.wflags & 32))
							g.append($("<br/>")), f.css("height", "33px");
						j = 0;
						for (k = h.length; j < k; ++j)
							j > 0 && g.append(", "), e = $("<a/>", {
										"class" : "q1",
										href : "/race=" + h[j],
										text : g_chr_races[h[j]]
									}), g.append(e)
					}
					f.append(g)
				}
				$(c).append(f)
			}
		}, {
			id : "level",
			name : LANG.level,
			value : "level",
			compute : function(b, c) {
				if (b.type || b.daily || b.weekly) {
					var e = $WH.ce("div");
					e.className = "small";
					$WH.nw(e);
					b.daily ? b.type ? $WH
							.ae(e,	$WH.ct($WH.sprintf(LANG.lvquest_daily,
											g_quest_types[b.type]))) : $WH.ae(
							e, $WH.ct(LANG.daily)) : b.weekly ? b.type ? $WH
							.ae(e,	$WH.ct($WH.sprintf(LANG.lvquest_weekly,
											g_quest_types[b.type]))) : $WH.ae(
							e, $WH.ct(LANG.weekly)) : b.type
							&& $WH.ae(e, $WH.ct(g_quest_types[b.type]));
					$WH.ae(c, e)
				}
				return b.level
			},
			getVisibleText : function(b) {
				var c = "";
				b.type && (c += " " + g_quest_types[b.type]);
				b.daily ? c += " " + LANG.daily : b.weekly
						&& (c += " " + LANG.weekly);
				b.level && (c += " " + b.level);
				return c
			},
			sortFunc : function(b, c) {
				return $WH.strcmp(b.level, c.level)
						|| $WH.strcmp(b.type, c.type)
			}
		}, {
			id : "reqlevel",
			name : LANG.req,
			tooltip : LANG.tooltip_reqlevel,
			value : "reqlevel"
		}, {
			id : "side",
			name : LANG.side,
			type : "text",
			compute : function(b, c) {
				if (b.side && b.side != 3) {
					var e = $WH.ce("span");
					e.className = b.side == 1 ? "icon-alliance" : "icon-horde";
					e.onmouseover = function(c) {
						$WH.Tooltip.showAtCursor(c, g_sides[b.side], 0, 0, "q")
					};
					e.onmousemove = $WH.Tooltip.cursorUpdate;
					e.onmouseout = $WH.Tooltip.hide;
					$WH.ae(c, e)
				} else
					b.side || $WH.ae(c, $WH.ct("??"))
			},
			getVisibleText : function(b) {
				if (b.side)
					return g_sides[b.side]
			},
			sortFunc : function(b, c) {
				return $WH.strcmp(g_sides[b.side], g_sides[c.side])
			}
		}, {
			id : "rewards",
			name : LANG.rewards,
			compute : function(b, c) {
				if (b.itemchoices != null || b.itemrewards != null) {
					var e, f;
					if (b.itemchoices
							&& b.itemchoices.length > 1
							&& (e = LANG.lvquest_pickone, b.itemrewards
									&& b.itemrewards.length > 0))
						f = LANG.lvquest_alsoget;
					Listview.funcBox
							.createCenteredIcons(b.itemchoices, c, e, 2);
					Listview.funcBox
							.createCenteredIcons(b.itemrewards, c, f, 2)
				}
				if (b.titlereward && g_titles[b.titlereward])
					e = g_titles[b.titlereward]["name_" + Locale.getName()], e = e
							.replace("%s", '<span class="q0">&lt;' + LANG.name
											+ "&gt;</span>"), f = $WH.ce("a"), f.className = $WH
							.isset("g_thottbot")
							&& g_thottbot ? "q" : "q1", f.href = "/title="
							+ b.titlereward, f.innerHTML = e, $WH.ae(c, f), $WH
							.ae(c, $WH.ce("br"))
			},
			getVisibleText : function(b) {
				var c = "";
				b.itemchoices
						&& b.itemchoices.length
						&& (c += " " + LANG.lvquest_pickone, b.itemrewards
								&& b.itemrewards.length
								&& (c += " " + LANG.lvquest_alsoget));
				b.titlereward
						&& g_titles[b.titlereward]
						&& (c += " "
								+ g_titles[b.titlereward]["name_"
										+ Locale.getName()]);
				return c
			},
			sortFunc : function(b, c) {
				var e = (b.itemchoices != null ? b.itemchoices.length : 0)
						+ (b.itemrewards != null ? b.itemrewards.length : 0), f = (c.itemchoices != null
						? c.itemchoices.length
						: 0)
						+ (c.itemrewards != null ? c.itemrewards.length : 0), g = b.titlereward
						&& g_titles[b.titlereward]
						? g_titles[b.titlereward]["name_" + Locale.getName()]
						: "", h = c.titlereward && g_titles[c.titlereward]
						? g_titles[c.titlereward]["name_" + Locale.getName()]
						: "";
				return $WH.strcmp(e, f) || $WH.strcmp(g, h)
			}
		}, {
			id : "experience",
			name : LANG.exp,
			value : "xp"
		}, {
			id : "money",
			name : LANG.money,
			compute : function(b, c) {
				if (b.money > 0 || b.currencyrewards != null)
					b.money > 0
							&& (Listview.funcBox.appendMoney(c, b.money), b.currencyrewards != null
									&& $WH.ae(c, $WH.ct(" + "))), b.currencyrewards != null
							&& Listview.funcBox.appendMoney(c, null, b.side,
									null, b.currencyrewards)
			},
			getVisibleText : function(b) {
				for (var c = "", e = 0; e < b.currencyrewards.length; ++e)
					g_gatheredcurrencies[b.currencyrewards[e][0]]
							&& (c += " "
									+ g_gatheredcurrencies[b.currencyrewards[e][0]]["name_"
											+ Locale.getName()]);
				return c
			},
			sortFunc : function(b, c) {
				var e = 0, f = 0;
				b.currencyrewards && b.currencyrewards.length
						&& $.each(b.currencyrewards, function(b, c) {
									e += c[1]
								});
				c.currencyrewards && c.currencyrewards.length
						&& $.each(c.currencyrewards, function(b, c) {
									f += c[1]
								});
				return $WH.strcmp(e, f) || $WH.strcmp(b.money, c.money)
			}
		}, {
			id : "reputation",
			name : LANG.reputation,
			width : "14%",
			value : "id",
			hidden : !0
		}, {
			id : "category",
			name : LANG.category,
			type : "text",
			compute : function(b, c) {
				if (b.category != 0) {
					c.className = $WH.isset("g_thottbot") && g_thottbot
							? "small q"
							: "small q1";
					var e = $WH.ce("a");
					e.href = "/quests=" + b.category2 + "." + b.category;
					$WH.ae(e, $WH.ct(Listview.funcBox
									.getQuestCategory(b.category)));
					$WH.ae(c, e)
				}
			},
			getVisibleText : function(b) {
				return Listview.funcBox.getQuestCategory(b.category)
			},
			sortFunc : function(b, c) {
				var e = Listview.funcBox.getQuestCategory;
				return $WH.strcmp(e(b.category), e(c.category))
			}
		}],
		getItemLink : function(b) {
			return "/quest=" + b.id
		}
	},
	skill : {
		sort : [1],
		searchable : 1,
		filtrable : 1,
		columns : [{
					id : "name",
					name : LANG.name,
					type : "text",
					align : "left",
					value : "name",
					span : 2,
					compute : function(b, c, e) {
						var f = $WH.ce("td");
						f.style.width = "1px";
						f.style.padding = "0";
						f.style.borderRight = "none";
						$WH.ae(f, Icon.create(b.icon, 0, null, this
												.getItemLink(b)));
						$WH.ae(e, f);
						c.style.borderLeft = "none";
						e = $WH.ce("div");
						f = $WH.ce("a");
						f.style.fontFamily = "Verdana, sans-serif";
						f.href = this.getItemLink(b);
						$WH.ae(f, $WH.ct(b.name));
						if (b.expansion) {
							var g = $WH.ce("span");
							g.className = g_GetExpansionClassName(b.expansion);
							$WH.ae(g, f);
							$WH.ae(e, g)
						} else
							$WH.ae(e, f);
						$WH.ae(c, e)
					},
					getVisibleText : function(b) {
						return b.name + Listview.funcBox.getExpansionText(b)
					}
				}, {
					id : "category",
					name : LANG.category,
					type : "text",
					width : "16%",
					compute : function(b, c) {
						if (b.category != 0) {
							c.className = $WH.isset("g_thottbot") && g_thottbot
									? "small q"
									: "small q1";
							var e = $WH.ce("a");
							e.href = "/skills=" + b.category;
							$WH.ae(e, $WH.ct(g_skill_categories[b.category]));
							$WH.ae(c, e)
						}
					},
					getVisibleText : function() {
						return g_skill_categories[skill.category]
					},
					sortFunc : function(b, c) {
						return $WH.strcmp(g_skill_categories[b.category],
								g_skill_categories[c.category])
					}
				}],
		getItemLink : function(b) {
			return "/skill=" + b.id
		}
	},
	spell : {
		sort : ["name", "skill", "level"],
		searchable : 1,
		filtrable : 1,
		columns : [{
			id : "name",
			name : LANG.name,
			type : "text",
			align : "left",
			span : 2,
			value : "name",
			compute : function(b, c, e) {
				var f = $WH.ce("td"), g;
				f.style.width = "44px";
				f.style.padding = "0";
				f.style.borderRight = "none";
				g = b.creates != null ? g_items.createIcon(b.creates[0], 1,
						Listview.funcBox.createTextRange(b.creates[1],
								b.creates[2])) : g_spells.createIcon(b.id, 1);
				g.style.cssFloat = g.style.styleFloat = "left";
				$WH.ae(f, g);
				$WH.ae(e, f);
				c.style.borderLeft = "none";
				e = $WH.ce("div");
				g = $WH.ce("a");
				f = b.name.charAt(0);
				if (f != "@")
					g.className = "q" + (7 - parseInt(f));
				g.style.fontFamily = "Verdana, sans-serif";
				g.href = this.getItemLink(b);
				$WH.ae(g, $WH.ct(b.name.substring(1)));
				$WH.ae(e, g);
				if (b.rank) {
					var h = $WH.ce("div");
					h.className = "small2";
					$WH.ae(h, $WH.ct(b.rank));
					$WH.ae(e, h)
				}
				if (this.showRecipeClass && b.reqclass) {
					h = $WH.ce("div");
					h.className = "small2";
					for (var j = Listview.funcBox.assocBinFlags(b.reqclass,
							g_chr_classes), f = 0, k = j.length; f < k; ++f)
						f > 0 && $WH.ae(h, $WH.ct(", ")), g = $WH.ce("a"), g.href = "/class="
								+ j[f], g.className = "c" + j[f], $WH.st(g,
								g_chr_classes[j[f]]), $WH.ae(h, g);
					$WH.ae(e, h)
				}
				if (b.reqrace) {
					e.style.position = "relative";
					h = $WH.ce("div");
					h.className = "small";
					h.style.fontStyle = "italic";
					h.style.position = "absolute";
					h.style.right = h.style.bottom = "3px";
					if ((b.reqrace & 1791) == 1101)
						$WH.ae(h, $WH.ct(g_sides[1]));
					else if ((b.reqrace & 1791) == 690)
						$WH.ae(h, $WH.ct(g_sides[2]));
					else {
						b = Listview.funcBox.assocBinFlags(b.reqrace,
								g_chr_races);
						h.className += $WH.isset("g_thottbot") && g_thottbot
								? " q"
								: " q1";
						f = 0;
						for (k = b.length; f < k; ++f)
							f > 0 && $WH.ae(h, $WH.ct(LANG.comma)), g = $WH
									.ce("a"), g.href = "/race=" + b[f], $WH.st(
									g, g_chr_races[b[f]]), $WH.ae(h, g)
					}
					$WH.ae(e, h)
				}
				$WH.ae(c, e)
			},
			getVisibleText : function(b) {
				var c = b.name;
				b.rank && (c += " " + b.rank);
				if (b.reqclass)
					for (var e = Listview.funcBox.assocBinFlags(b.reqclass,
							g_chr_classes), f = 0, g = e.length; f < g; ++f)
						f > 0 && (c += LANG.comma), c += g_chr_classes[e[f]];
				b.reqrace
						&& (c += " "
								+ Listview.funcBox.arrayText(Listview.funcBox
												.assocBinFlags(b.reqrace,
														g_chr_races),
										g_chr_races));
				return c
			}
		}, {
			id : "tier",
			name : LANG.tier,
			width : "10%",
			value : "level",
			compute : function(b) {
				if (b.level > 0)
					return Math.floor((b.level - (!this._petTalents ? 10 : 20))
							/ (!this._petTalents ? 5 : 12))
							+ 1
			},
			hidden : !0
		}, {
			id : "level",
			name : LANG.level,
			width : "10%",
			value : "level",
			compute : function(b) {
				if (b.level > 0)
					return b.level
			},
			hidden : !0
		}, {
			id : "trainingcost",
			name : LANG.cost,
			width : "10%",
			hidden : !0,
			getValue : function(b) {
				if (b.trainingcost)
					return b.trainingcost
			},
			compute : function(b, c) {
				b.trainingcost
						&& Listview.funcBox.appendMoney(c, b.trainingcost)
			},
			sortFunc : function(b, c) {
				if (b.trainingcost == null)
					return -1;
				else if (c.trainingcost == null)
					return 1;
				if (b.trainingcost < c.trainingcost)
					return -1;
				else if (b.trainingcost > c.trainingcost)
					return 1;
				return 0
			}
		}, {
			id : "classes",
			name : LANG.classes,
			type : "text",
			hidden : !0,
			width : "20%",
			getVisibleText : function(b) {
				var c = "";
				if (b.reqclass)
					for (var b = Listview.funcBox.assocBinFlags(b.reqclass,
							g_chr_classes), e = 0, f = b.length; e < f; ++e)
						e > 0 && (c += LANG.comma), c += g_chr_classes[b[e]];
				return c
			},
			compute : function(b, c) {
				if (b.reqclass) {
					var e = Listview.funcBox.assocBinFlags(b.reqclass,
							g_chr_classes), f = $WH.ce("div");
					f.style.width = 26 * e.length + "px";
					f.style.margin = "0 auto";
					for (var g = 0, h = e.length; g < h; ++g) {
						var j = Icon.create("class_" + g_file_classes[e[g]], 0,
								null, "/class=" + e[g]);
						j.style.cssFloat = j.style.styleFloat = "left";
						$WH.ae(f, j)
					}
					$WH.ae(c, f)
				}
			},
			sortFunc : function(b, c) {
				return Listview.funcBox.assocArrCmp(Listview.funcBox
								.assocBinFlags(b.reqclass, g_chr_classes),
						Listview.funcBox.assocBinFlags(c.reqclass,
								g_chr_classes), g_chr_classes)
			}
		}, {
			id : "singleclass",
			name : LANG.classs,
			type : "text",
			hidden : !0,
			width : "15%",
			compute : function(b, c) {
				if (b.reqclass) {
					var e = Listview.funcBox.assocBinFlags(b.reqclass,
							g_chr_classes)[0], e = $("<a>").css(
							"background-image",
							'url("http://static.wowhead.com/images/wow/icons/tiny/class_'
									+ g_file_classes[e] + '.gif")')
							.addClass("icontiny").addClass("c" + e).attr(
									"href", "/class=" + e)
							.text(g_chr_classes[e]);
					$(c).append(e)
				}
			},
			sortFunc : function(b, c) {
				return Listview.funcBox.assocArrCmp(Listview.funcBox
								.assocBinFlags(b.reqclass, g_chr_classes),
						Listview.funcBox.assocBinFlags(c.reqclass,
								g_chr_classes), g_chr_classes)
			}
		}, {
			id : "glyphtype",
			name : LANG.glyphtype,
			type : "text",
			hidden : !0,
			width : "10%",
			compute : function(b) {
				if (b.glyphtype)
					return g_item_glyphs[b.glyphtype]
			}
		}, {
			id : "guildlevel",
			name : LANG.guildlevel,
			width : "10%",
			value : "guildlevel",
			compute : function(b) {
				if (b.guildlevel > 0)
					return b.guildlevel
			},
			hidden : !0
		}, {
			id : "schools",
			name : LANG.school,
			type : "text",
			width : "10%",
			hidden : !0,
			compute : function(b) {
				for (var c = "", b = b.schools ? b.schools : b.school, e = 0; e < 32; ++e)
					b
							& 1 << e
							&& (c != "" && (c += ", "), c += g_spell_resistances[e]);
				return c
			},
			sortFunc : function(b, c) {
				return $WH.strcmp(this.compute(b), this.compute(c))
			}
		}, {
			id : "type",
			name : LANG.type,
			type : "text",
			width : "10%",
			hidden : !0,
			compute : function(b) {
				if (g_spell_types[b.cat])
					return g_spell_types[b.cat][b.type];
				return b.type
			},
			sortFunc : function(b, c) {
				var e = g_spell_types[b.cat]
						? g_spell_types[b.cat][b.type]
						: b.type, f = g_spell_types[c.cat]
						? g_spell_types[c.cat][c.type]
						: b.type;
				return $WH.strcmp(b.cat, c.cat) || $WH.strcmp(e, f)
			}
		}, {
			id : "reagents",
			name : LANG.reagents,
			width : "9%",
			getValue : function(b) {
				return b.reagents ? b.reagents.length : 0
			},
			compute : function(b, c) {
				if (b.reagents != null) {
					c.style.padding = "0";
					var e = $WH.ce("div"), f = b.reagents;
					e.style.width = 44 * f.length + "px";
					e.style.margin = "0 auto";
					for (var g = 0, h = f.length; g < h; ++g) {
						var j = g_items.createIcon(f[g][0], 1, f[g][1]);
						j.style.cssFloat = j.style.styleFloat = "left";
						$WH.ae(e, j)
					}
					$WH.ae(c, e)
				}
			},
			sortFunc : function(b, c) {
				var e = b.reagents != null ? b.reagents.length : 0, f = c.reagents != null
						? c.reagents.length
						: 0;
				return e > 0 && e == f ? $WH.strcmp(b.reagents.toString(),
						c.reagents.toString()) : $WH.strcmp(e, f)
			}
		}, {
			id : "source",
			name : LANG.source,
			type : "text",
			width : "12%",
			hidden : !0,
			compute : function(b) {
				if (b.source != null) {
					for (var c = "", e = 0, f = b.source.length; e < f; ++e)
						e > 0 && (c += LANG.comma), c += g_sources[b.source[e]];
					return c
				}
			},
			sortFunc : function(b, c) {
				return Listview.funcBox.assocArrCmp(b.source, c.source,
						g_sources)
			}
		}, {
			id : "branch",
			name : LANG.branch,
			type : "text",
			width : "10%",
			hidden : !0,
			compute : function(b, c) {
				b.project
						&& (g_project_branches[b.project.branch]
								&& $(c)
										.append(g_project_branches[b.project.branch]
												+ "<br />"), $(c)
								.append("<small"
										+ (!b.project.rarity
												? ' class="q0"'
												: "")
										+ ">"
										+ g_project_rarity[b.project.rarity
												|| 0] + "</small>"))
			},
			getVisibleText : function(b) {
				var c = "";
				b.project
						&& (g_project_branches[b.project.branch]
								&& (c += g_project_branches[b.project.branch]
										+ " "), c += g_project_rarity[b.project.rarity
								|| 0]);
				return c
			},
			sortFunc : function(b, c) {
				if (!b.project || !c.project)
					return b.project ? 1 : c.project ? -1 : 0;
				return $WH.strcmp(g_project_branches[b.project.branch],
						g_project_branches[c.project.branch])
						|| -$WH.strcmp(b.project.rarity, c.project.rarity)
			}
		}, {
			id : "fragments",
			name : LANG.fragments,
			type : "text",
			width : "10%",
			hidden : !0,
			compute : function(b, c) {
				if (b.project) {
					var e = $("<a/>", {
								href : "/currency=" + b.project.currency,
								text : b.project.ncurrency
							});
					e.addClass("q1");
					g_gatheredcurrencies[b.project.currency]
							&& (e.addClass("icontinyr tip"), e
									.css(
											"background-image",
											"url("
													+ g_staticUrl
													+ "/images/wow/icons/tiny/"
													+ g_gatheredcurrencies[b.project.currency].icon[0]
															.toLowerCase()
													+ ".gif)"), e.mouseover(
									function(c) {
										$WH.Tooltip
												.showAtCursor(
														c,
														g_gatheredcurrencies[b.project.currency]["name_"
																+ Locale
																		.getName()],
														0, 0, "q")
									}), e.mousemove($WH.Tooltip.cursorUpdate), e
									.mouseout($WH.Tooltip.hide));
					$(c).append(e)
				}
			},
			sortFunc : function(b, c) {
				if (!b.project || !c.project)
					return b.project ? 1 : c.project ? -1 : 0;
				return $WH.strcmp(b.project.ncurrency, c.project.ncurrency)
						|| $WH.strcmp(b.project.currency, c.project.currency)
			}
		}, {
			id : "keystone",
			name : LANG.keystone,
			type : "text",
			width : "10%",
			hidden : !0,
			compute : function(b, c) {
				if (b.project && b.project.nkeystones
						&& g_items[b.project.keystone]) {
					c.style.padding = "0";
					var e = $WH.ce("div");
					e.style.width = "44px";
					e.style.margin = "0 auto";
					$WH.ae(e, g_items.createIcon(b.project.keystone, 1,
									b.project.nkeystones));
					$WH.ae(c, e)
				}
			},
			getVisibleText : function(b) {
				if (b.project && b.project.nkeystones
						&& g_items[b.project.keystone])
					return g_items[b.project.keystone]["name_"
							+ Locale.getName()]
			},
			sortFunc : function(b, c) {
				if (!b.project || !c.project)
					return b.project ? 1 : c.project ? -1 : 0;
				var e = b.project.nkeystones && g_items[b.project.keystone]
						? g_items[b.project.keystone]["name_"
								+ Locale.getName()]
						: "", f = c.project.nkeystones
						&& g_items[c.project.keystone]
						? g_items[c.project.keystone]["name_"
								+ Locale.getName()]
						: "";
				return $WH.strcmp(e, f)
						|| $WH.strcmp(b.project.nkeystones,
								c.project.nkeystones)
			}
		}, {
			id : "skill",
			name : LANG.skill,
			type : "text",
			width : "16%",
			getValue : function(b) {
				return b.learnedat
			},
			compute : function(b, c, e, f) {
				if (b.skill != null) {
					this.skillsColumn = f;
					e = $WH.ce("div");
					e.className = "small";
					if (b.cat == -7 && b.pettype != null) {
						b.skill = [];
						for (var g = {
							0 : 410,
							1 : 409,
							2 : 411
						}, h = 0, j = b.pettype.length; h < j; ++h)
							b.skill.push(g[b.pettype[h]])
					}
					h = 0;
					for (j = b.skill.length; h < j; ++h)
						if (h > 0 && $WH.ae(e, $WH.ct(LANG.comma)), b.skill[h] == -1)
							$WH.ae(e, $WH.ct(LANG.ellipsis));
						else if ($WH.in_array([7, -2, -3, -5, -6, -7, 11, 9],
								b.cat) != -1) {
							g = $WH.ce("a");
							g.className = $WH.isset("g_thottbot") && g_thottbot
									? "q"
									: "q1";
							g.href = $WH.in_array([-5, -6], b.cat) != -1
									? "/spells=" + b.cat
									: "/spells="
											+ b.cat
											+ "."
											+ (b.reqclass
													&& (b.cat == 7 || b.cat == -2)
													? 1 + Math.log(b.reqclass)
															/ Math.LN2 + "."
													: "") + b.skill[h];
							var k = $WH.g_getGets(), k = k.spells ? k.spells
									.split(".") : [!1, !1];
							if (b.reqclass
									&& (b.cat == 7 || b.cat == -2)
									&& h < 1
									&& 1 + Math.log(b.reqclass) / Math.LN2 != k[1])
								k = $WH.ce("a"), k.className = "q0", k.href = "/spells="
										+ b.cat
										+ "."
										+ (1 + Math.log(b.reqclass) / Math.LN2), $WH
										.ae(k,	$WH.ct(g_chr_classes[1
														+ Math.log(b.reqclass)
														/ Math.LN2])), $WH.ae(
										e, k), $WH.ae(e, $WH.ce("br"));
							$WH.ae(g, $WH.ct(b.cat == -7 && b.pettype != null
											? g_pet_types[b.pettype[h]]
											: g_spell_skills[b.skill[h]]));
							$WH.ae(e, g)
						} else
							$WH.ae(e, $WH.ct(g_spell_skills[b.skill[h]]));
					if (b.learnedat > 0) {
						$WH.ae(e, $WH.ct(" ("));
						h = $WH.ce("span");
						if (b.learnedat == 9999)
							h.className = "q0", $WH.ae(h, $WH.ct("??"));
						else if (b.learnedat > 0)
							$WH.ae(h, $WH.ct(b.learnedat)), h.style.fontWeight = "bold";
						$WH.ae(e, h);
						$WH.ae(e, $WH.ct(")"))
					}
					$WH.ae(c, e);
					if (b.colors != null) {
						this.columns[f].type = null;
						b = b.colors;
						for (h = f = 0; h < b.length; ++h)
							if (b[h] > 0) {
								++f;
								break
							}
						if (f > 0) {
							f = 0;
							e = $WH.ce("div");
							e.className = "small";
							e.style.fontWeight = "bold";
							for (h = 0; h < b.length; ++h)
								if (b[h] > 0)
									f++ > 0 && $WH.ae(e, $WH.ct(" ")), j = $WH
											.ce("span"), j.className = "r"
											+ (h + 1), $WH.ae(j, $WH.ct(b[h])), $WH
											.ae(e, j);
							$WH.ae(c, e)
						}
					}
				}
			},
			getVisibleText : function(b) {
				var c = Listview.funcBox.arrayText(b.skill, g_spell_skills);
				b.learnedat > 0
						&& (c += " "
								+ (b.learnedat == 9999 ? "??" : b.learnedat));
				return c
			},
			sortFunc : function(b, c) {
				if (b.reqclass && c.reqclass) {
					var e = $WH.strcmp(g_chr_classes[1 + Math.log(b.reqclass)
									/ Math.LN2], g_chr_classes[1
									+ Math.log(c.reqclass) / Math.LN2]);
					if (e)
						return e
				}
				for (var f = [b.learnedat, c.learnedat], g = 0; g < 2; ++g) {
					var h = g == 0 ? b : c;
					if (f[g] == 9999 && h.colors != null) {
						for (e = 0; h.colors[e] == 0 && e < h.colors.length;)
							e++;
						e < h.colors.length && (f[g] = h.colors[e])
					}
				}
				f = $WH.strcmp(f[0], f[1]);
				if (f != 0)
					return f;
				if (b.colors != null && c.colors != null)
					for (e = 0; e < 4; ++e)
						if (f = $WH.strcmp(b.colors[e], c.colors[e]), f != 0)
							return f;
				if (b.pettype != null & c.pettype != null)
					return Listview.funcBox.assocArrCmp(b.pettype, c.pettype,
							g_pet_types);
				return Listview.funcBox.assocArrCmp(b.skill, c.skill,
						g_spell_skills)
			}
		}, {
			id : "skillup",
			name : LANG.skillpoints,
			width : "10%",
			value : "nskillup",
			compute : function(b) {
				if (b.nskillup > 0)
					return b.nskillup
			},
			hidden : !0
		}],
		getItemLink : function(b) {
			return link_178db("spell", b.id)
		}
	},
	zone : {
		sort : [1],
		nItemsPerPage : -1,
		searchable : 1,
		filtrable : 1,
		columns : [{
					id : "name",
					name : LANG.name,
					type : "text",
					align : "left",
					value : "name",
					compute : function(b, c) {
						var e = $WH.ce("a");
						e.style.fontFamily = "Verdana, sans-serif";
						e.href = this.getItemLink(b);
						$WH.ae(e, $WH.ct(b.name));
						if (b.expansion) {
							var f = $WH.ce("span");
							f.className = g_GetExpansionClassName(b.expansion);
							$WH.ae(f, e);
							$WH.ae(c, f)
						} else
							$WH.ae(c, e)
					},
					getVisibleText : function(b) {
						var c = b.name + Listview.funcBox.getExpansionText(b);
						if (b.instance == 5 || b.instance == 8)
							c += " heroic";
						return c
					}
				}, {
					id : "level",
					name : LANG.level,
					type : "range",
					width : "10%",
					getMinValue : function(b) {
						return b.minlevel
					},
					getMaxValue : function(b) {
						return b.maxlevel
					},
					compute : function(b) {
						if (b.minlevel > 0 && b.maxlevel > 0)
							return b.minlevel != b.maxlevel ? b.minlevel
									+ LANG.hyphen + b.maxlevel : b.minlevel
					},
					sortFunc : function(b, c, e) {
						return e > 0 ? $WH.strcmp(b.minlevel, c.minlevel)
								|| $WH.strcmp(b.maxlevel, c.maxlevel) : $WH
								.strcmp(b.maxlevel, c.maxlevel)
								|| $WH.strcmp(b.minlevel, c.minlevel)
					}
				}, {
					id : "players",
					name : LANG.players,
					type : "text",
					hidden : !0,
					compute : function(b, c) {
						if (b.instance > 0) {
							var e = $WH.ce("span");
							if (b.nplayers == -2)
								b.nplayers = "10/25";
							var f = "";
							b.nplayers
									&& (f += b.instance == 4 ? $WH.sprintf(
											LANG.lvzone_xvx, b.nplayers,
											b.nplayers) : $WH.sprintf(
											LANG.lvzone_xman, b.nplayers));
							$WH.ae(e, $WH.ct(f));
							$WH.ae(c, e)
						}
					},
					getVisibleText : function(b) {
						if (b.instance > 0) {
							if (b.nplayers == -2)
								b.nplayers = "10/25";
							var c = "";
							if (b.nplayers
									&& (b.instance != 2 && b.instance != 5 || b.nplayers > 5))
								c += b.instance == 4 ? $WH
										.sprintf(LANG.lvzone_xvx, b.nplayers,
												b.nplayers) : $WH.sprintf(
										LANG.lvzone_xman, b.nplayers);
							return c
						}
					},
					sortFunc : function(b, c) {
						return $WH.strcmp(b.nplayers, c.nplayers)
					}
				}, {
					id : "territory",
					name : LANG.territory,
					type : "text",
					width : "13%",
					compute : function(b, c) {
						var e = $WH.ce("span");
						switch (b.territory) {
							case 0 :
								e.className = "icon-alliance";
								break;
							case 1 :
								e.className = "icon-horde";
								break;
							case 4 :
								e.className = "icon-ffa"
						}
						$WH.ae(e, $WH.ct(g_zone_territories[b.territory]));
						$WH.ae(c, e)
					},
					getVisibleText : function(b) {
						return g_zone_territories[b.territory]
					},
					sortFunc : function(b, c) {
						return $WH.strcmp(g_zone_territories[b.territory],
								g_zone_territories[c.territory])
					}
				}, {
					id : "instancetype",
					name : LANG.instancetype,
					type : "text",
					compute : function(b, c) {
						if (b.instance > 0) {
							var e = $WH.ce("span");
							if (b.instance >= 1 && b.instance <= 5
									|| b.instance == 7 || b.instance == 8)
								e.className = "icon-instance" + b.instance;
							var f = g_zone_instancetypes[b.instance];
							if (b.heroicLevel) {
								var g = $WH.ce("span");
								g.className = "icon-heroic";
								g_addTooltip(g,
										LANG.tooltip_heroicmodeavailable
												+ LANG.qty.replace("$1",
														b.heroicLevel));
								$WH.ae(c, g)
							}
							$WH.ae(e, $WH.ct(f));
							$WH.ae(c, e)
						}
					},
					getVisibleText : function(b) {
						if (b.instance > 0) {
							var c = g_zone_instancetypes[b.instance];
							if (b.nplayers
									&& (b.instance != 2 && b.instance != 5 || b.nplayers > 5))
								c += b.instance == 4 ? " "
										+ $WH.sprintf(LANG.lvzone_xvx,
												b.nplayers, b.nplayers) : " "
										+ $WH.sprintf(LANG.lvzone_xman,
												b.nplayers);
							if (b.instance == 5 || b.instance == 8)
								c += " heroic";
							return c
						}
					},
					sortFunc : function(b, c) {
						return $WH.strcmp(g_zone_instancetypes[b.instance],
								g_zone_instancetypes[c.instance])
								|| $WH.strcmp(b.instance, c.instance)
								|| $WH.strcmp(b.nplayers, c.nplayers)
					}
				}, {
					id : "category",
					name : LANG.category,
					type : "text",
					width : "15%",
					compute : function(b, c) {
						c.className = $WH.isset("g_thottbot") && g_thottbot
								? "small q"
								: "small q1";
						var e = $WH.ce("a");
						e.href = "/zones=" + b.category;
						$WH.ae(e, $WH.ct(g_zone_categories[b.category]));
						$WH.ae(c, e)
					},
					getVisibleText : function(b) {
						return g_zone_categories[b.category]
					},
					sortFunc : function(b, c) {
						return $WH.strcmp(g_zone_categories[b.category],
								g_zone_categories[c.category])
					}
				}],
		getItemLink : function(b) {
			return "/zone=" + b.id
		}
	},
	holiday : {
		sort : [2, 1],
		nItemsPerPage : -1,
		searchable : 1,
		filtrable : 1,
		columns : [{
					id : "name",
					name : LANG.name,
					type : "text",
					align : "left",
					value : "name",
					span : 2,
					compute : function(b, c, e) {
						var f = $WH.ce("td");
						f.style.width = "1px";
						f.style.padding = "0";
						f.style.borderRight = "none";
						$WH.ae(f, g_holidays.createIcon(b.id, 0));
						$WH.ae(e, f);
						c.style.borderLeft = "none";
						e = $WH.ce("a");
						e.style.fontFamily = "Verdana, sans-serif";
						e.href = this.getItemLink(b);
						$WH.ae(e, $WH.ct(b.name));
						$WH.ae(c, e)
					},
					getVisibleText : function(b) {
						return b.name
					}
				}, {
					id : "date",
					name : LANG.date,
					type : "text",
					width : "16%",
					allText : !0,
					compute : function(b, c) {
						if (b.startDate && b.endDate) {
							var e = Listview.funcBox.getEventNextDates(
									b.startDate, b.endDate, b.rec || 0);
							if (e[0] && e[1]) {
								var f = g_formatDateSimple(e[0]), e = g_formatDateSimple(e[1]), g = $WH
										.ce("span");
								f != e ? $WH.st(g, f + LANG.hyphen + e) : $WH
										.st(g, f);
								$WH.ae(c, g)
							}
						}
					},
					getVisibleText : function(b) {
						if (b.startDate && b.endDate) {
							var c = Listview.funcBox.getEventNextDates(
									b.startDate, b.endDate, b.rec || 0);
							if (c[0] && c[1])
								return b = g_formatDateSimple(c[0]), c = g_formatDateSimple(c[1]), b != c
										? b + LANG.hyphen + c
										: b
						}
						return ""
					},
					sortFunc : function(b, c) {
						if (b.startDate && c.startDate) {
							var e = Listview.funcBox.getEventNextDates(
									b.startDate, b.endDate, b.rec || 0), f = Listview.funcBox
									.getEventNextDates(c.startDate, c.endDate,
											c.rec || 0);
							if (e[0] && f[0])
								return e[0] - f[0]
						} else if (b.startDate)
							return -1;
						else if (c.startDate)
							return 1;
						return 0
					}
				}, {
					id : "category",
					name : LANG.category,
					type : "text",
					width : "16%",
					compute : function(b, c) {
						c.className = $WH.isset("g_thottbot") && g_thottbot
								? "small q"
								: "small q1";
						var e = $WH.ce("a");
						e.href = "/events=" + b.category;
						$WH.ae(e, $WH.ct(g_holiday_categories[b.category]));
						$WH.ae(c, e)
					},
					getVisibleText : function(b) {
						return g_holiday_categories[b.category]
					},
					sortFunc : function(b, c) {
						return $WH.strcmp(g_holiday_categories[b.category],
								g_holiday_categories[c.category])
					}
				}],
		getItemLink : function(b) {
			return "/event=" + b.id
		}
	},
	screenshot : {
		sort : [],
		mode : 3,
		nItemsPerPage : 40,
		nItemsPerRow : 4,
		poundable : 2,
		columns : [],
		compute : function(b, c, e) {
			var f = new Date(b.date), g = (g_serverTime - f) / 1E3;
			c.className = "screenshot-cell";
			c.vAlign = "bottom";
			var h = $WH.ce("a");
			h.href = "#screenshots:id=" + b.id;
			h.onclick = $WH.rf2;
			var j = $WH.ce("img");
			j.src = g_staticUrl + "/uploads/screenshots/thumb/" + b.id + ".jpg";
			$WH.ae(h, j);
			$WH.ae(c, h);
			j = $WH.ce("div");
			j.className = "screenshot-cell-user";
			var k = b.user != null && b.user.length;
			if (k)
				h = $WH.ce("a"), h.href = "/user=" + b.user, $WH.ae(h, $WH
								.ct(b.user)), $WH.ae(j, $WH
								.ct(LANG.lvscreenshot_from)), $WH.ae(j, h), $WH
						.ae(j, $WH.ct(" "));
			h = $WH.ce("span");
			k ? Listview.funcBox.coFormatDate(h, g, f) : Listview.funcBox
					.coFormatDate(h, g, f, 0, 1);
			$WH.ae(j, h);
			$WH.ae(j, $WH.ct(" " + LANG.dash + " "));
			h = $WH.ce("a");
			h.href = "javascript:;";
			h.onclick = ContactTool.show.bind(ContactTool, {
						mode : 3,
						screenshot : b
					});
			if (!$WH.isset("g_thottbot") || !g_thottbot)
				h.className = "icon-report";
			g_addTooltip(h, LANG.report_tooltip, "q2");
			$WH.ae(h, $WH.ct(LANG.report));
			$WH.ae(j, h);
			$WH.ae(c, j);
			j = $WH.ce("div");
			j.style.position = "relative";
			j.style.height = "1em";
			if (Locale.getId() != LOCALE_ENUS && b.caption)
				b.caption = "";
			g = b.caption != null && b.caption.length;
			h = b.subject != null && b.subject.length;
			if (g || h) {
				f = $WH.ce("div");
				f.className = "screenshot-caption";
				if (h)
					h = $WH.ce("small"), $WH.ae(h, $WH.ct(LANG.types[b.type][0]
									+ LANG.colon)), k = $WH.ce("a"), $WH.ae(k,
							$WH.ct(b.subject)), k.href = g_getCommentDomain(b.domain)
							+ "/" + g_types[b.type] + "=" + b.typeId, $WH.ae(h,
							k), $WH.ae(f, h), g && b.caption.length
							&& $WH.ae(h, $WH.ct(" (...)")), $WH.ae(h, $WH
									.ce("br"));
				if (g)
					$WH.aE(c, "mouseover", Listview.funcBox.ssCellOver.bind(f)), $WH
							.aE(c, "mouseout", Listview.funcBox.ssCellOut
											.bind(f)), g = $WH.ce("span"), g.innerHTML = Markup
							.toHtml(b.caption, {
										mode : Markup.MODE_SIGNATURE
									}), $WH.ae(f, g);
				$WH.ae(j, f)
			}
			$WH.aE(c, "click", Listview.funcBox.ssCellClick.bind(this, e));
			$WH.ae(c, j)
		},
		createNote : function(b) {
			if (typeof g_pageInfo == "object" && g_pageInfo.type > 0) {
				var c = $WH.ce("small"), e = $WH.ce("a");
				g_user.id > 0
						? (e.href = "javascript:;", e.onclick = ss_submitAScreenshot)
						: e.href = "/account=signin";
				$WH.ae(e, $WH.ct(LANG.lvscreenshot_submit));
				$WH.ae(c, e);
				$WH.ae(b, c)
			}
		},
		onNoData : function(b) {
			if (typeof g_pageInfo == "object" && g_pageInfo.type > 0) {
				var c = "<b>" + LANG.lvnodata_ss1
						+ '</b><div class="pad2"></div>';
				if (g_user.id > 0)
					var e = LANG.lvnodata_ss2, e = e
							.replace(
									"<a>",
									'<a href="javascript:;" onclick="ss_submitAScreenshot()" onmousedown="return false">');
				else
					e = LANG.lvnodata_ss3, e = e.replace("<a>",
							'<a href="/account=signin">'), e = e.replace("<a>",
							'<a href="/account=signup">');
				c += e;
				b.style.padding = "1.5em 0";
				b.innerHTML = c
			} else
				return -1
		},
		onBeforeCreate : function() {
			if (location.hash && location.hash.match(/:id=([0-9]+)/) != null) {
				var b = $WH.in_array(this.data, parseInt(RegExp.$1),
						function(b) {
							return b.id
						});
				this.rowOffset = this.getRowOffset(b);
				return b
			}
		},
		onAfterCreate : function(b) {
			b != null && setTimeout(function() {
						ScreenshotViewer.show({
									screenshots : this.data,
									pos : b
								})
					}.bind(this), 1)
		}
	},
	video : {
		sort : [],
		mode : 3,
		nItemsPerPage : 40,
		nItemsPerRow : 4,
		poundable : 2,
		columns : [],
		compute : function(b, c, e) {
			var f = new Date(b.date), g = (g_serverTime - f) / 1E3;
			c.className = "screenshot-cell";
			c.vAlign = "bottom";
			var h = $WH.ce("a");
			h.href = "#videos:id=" + b.id;
			h.onclick = $WH.rf2;
			var j = $WH.ce("img");
			j.src = $WH.sprintf(vi_thumbnails[b.videoType], b.videoId);
			$WH.ae(h, j);
			$WH.ae(c, h);
			j = $WH.ce("div");
			j.className = "screenshot-cell-user";
			var k = b.user != null && b.user.length;
			if (k)
				h = $WH.ce("a"), h.href = "/user=" + b.user, $WH.ae(h, $WH
								.ct(b.user)), $WH.ae(j, $WH
								.ct(LANG.lvvideo_from)), $WH.ae(j, h), $WH.ae(
						j, $WH.ct(" "));
			h = $WH.ce("span");
			k ? Listview.funcBox.coFormatDate(h, g, f) : Listview.funcBox
					.coFormatDate(h, g, f, 0, 1);
			$WH.ae(j, h);
			$WH.ae(c, j);
			j = $WH.ce("div");
			j.style.position = "relative";
			j.style.height = "1em";
			if (Locale.getId(!0) != LOCALE_ENUS && b.caption)
				b.caption = "";
			g = b.caption != null && b.caption.length;
			h = b.subject != null && b.subject.length;
			if (g || h) {
				f = $WH.ce("div");
				f.className = "screenshot-caption";
				if (h)
					h = $WH.ce("small"), $WH.ae(h, $WH.ct(LANG.types[b.type][0]
									+ LANG.colon)), k = $WH.ce("a"), $WH.ae(k,
							$WH.ct(b.subject)), k.href = g_getCommentDomain(b.domain)
							+ "/" + g_types[b.type] + "=" + b.typeId, $WH.ae(h,
							k), $WH.ae(f, h), g && b.caption.length
							&& $WH.ae(h, $WH.ct(" (...)")), $WH.ae(h, $WH
									.ce("br"));
				if (g)
					$WH.aE(c, "mouseover", Listview.funcBox.ssCellOver.bind(f)), $WH
							.aE(c, "mouseout", Listview.funcBox.ssCellOut
											.bind(f)), g = $WH.ce("span"), g.innerHTML = Markup
							.toHtml(b.caption, {
										mode : Markup.MODE_SIGNATURE
									}), $WH.ae(f, g);
				$WH.ae(j, f)
			}
			$WH.aE(c, "click", Listview.funcBox.viCellClick.bind(this, e));
			$WH.ae(c, j)
		},
		createNote : function(b) {
			if (g_user && g_user.roles
					& (U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_VIDEO)
					&& typeof g_pageInfo == "object" && g_pageInfo.type > 0) {
				var c = $WH.ce("small"), e = $WH.ce("a");
				g_user.id > 0
						? (e.href = "javascript:;", e.onclick = vi_submitAVideo)
						: e.href = "/account=signin";
				$WH.ae(e, $WH.ct(LANG.lvvideo_suggest));
				$WH.ae(c, e);
				$WH.ae(b, c)
			}
		},
		onNoData : function(b) {
			if (typeof g_pageInfo == "object" && g_pageInfo.type > 0) {
				var c = "<b>" + LANG.lvnodata_vi1
						+ '</b><div class="pad2"></div>';
				if (g_user.id > 0)
					var e = LANG.lvnodata_vi2, e = e
							.replace(
									"<a>",
									'<a href="javascript:;" onclick="vi_submitAVideo()" onmousedown="return false">');
				else
					e = LANG.lvnodata_vi3, e = e.replace("<a>",
							'<a href="/account=signin">'), e = e.replace("<a>",
							'<a href="/account=signup">');
				c += e;
				b.style.padding = "1.5em 0";
				b.innerHTML = c
			} else
				return -1
		},
		onBeforeCreate : function() {
			if (location.hash && location.hash.match(/:id=([0-9]+)/) != null) {
				var b = $WH.in_array(this.data, parseInt(RegExp.$1),
						function(b) {
							return b.id
						});
				this.rowOffset = this.getRowOffset(b);
				return b
			}
		},
		onAfterCreate : function(b) {
			b != null && setTimeout(function() {
						VideoViewer.show({
									videos : this.data,
									pos : b,
									displayAd : !0
								})
					}.bind(this), 1)
		}
	},
	pet : {
		sort : [1],
		nItemsPerPage : -1,
		searchable : 1,
		filtrable : 1,
		columns : [{
			id : "name",
			name : LANG.name,
			type : "text",
			align : "left",
			value : "name",
			span : 2,
			compute : function(b, c, e) {
				var f = $WH.ce("td");
				f.style.width = "1px";
				f.style.padding = "0";
				f.style.borderRight = "none";
				$WH.ae(f, Icon.create(b.icon, 0));
				$WH.ae(e, f);
				c.style.borderLeft = "none";
				e = $WH.ce("div");
				f = $WH.ce("a");
				f.style.fontFamily = "Verdana, sans-serif";
				f.href = this.getItemLink(b);
				$WH.ae(f, $WH.ct(b.name));
				if (b.expansion) {
					var g = $WH.ce("span");
					g.className = g_GetExpansionClassName(b.expansion);
					$WH.ae(g, f);
					$WH.ae(e, g)
				} else
					$WH.ae(e, f);
				if (b.exotic)
					e.style.position = "relative", b = $WH.ce("div"), b.className = $WH
							.isset("g_thottbot")
							&& g_thottbot ? "small q" : "small q1", b.style.fontStyle = "italic", b.style.position = "absolute", b.style.right = "3px", b.style.bottom = "0px", f = $WH
							.ce("a"), f.href = link_178db("spell", 53270), $WH
							.ae(f, $WH.ct(LANG.lvpet_exotic)), $WH.ae(b, f), $WH
							.ae(e, b);
				$WH.ae(c, e)
			},
			getVisibleText : function(b) {
				var c = b.name + Listview.funcBox.getExpansionText(b);
				b.exotic && (c += " " + LANG.lvpet_exotic);
				return c
			}
		}, {
			id : "level",
			name : LANG.level,
			type : "range",
			getMinValue : function(b) {
				return b.minlevel
			},
			getMaxValue : function(b) {
				return b.maxlevel
			},
			compute : function(b) {
				return b.minlevel > 0 && b.maxlevel > 0
						? b.minlevel != b.maxlevel ? b.minlevel + LANG.hyphen
								+ b.maxlevel : b.minlevel
						: -1
			},
			sortFunc : function(b, c, e) {
				return e > 0 ? $WH.strcmp(b.minlevel, c.minlevel)
						|| $WH.strcmp(b.maxlevel, c.maxlevel) : $WH.strcmp(
						b.maxlevel, c.maxlevel)
						|| $WH.strcmp(b.minlevel, c.minlevel)
			}
		}, {
			id : "abilities",
			name : LANG.abilities,
			type : "text",
			getValue : function(b) {
				if (!b.spells)
					return "";
				if (b.spells.length > 0) {
					for (var c = "", e = 0, f = b.spells.length; e < f; ++e)
						b.spells[e]
								&& (c += g_spells[b.spells[e]]["name_"
										+ Locale.getName()]);
					return c
				}
			},
			compute : function(b, c) {
				if (!b.spells)
					return "";
				if (b.spells.length > 0)
					c.style.padding = "0", Listview.funcBox
							.createCenteredIcons(b.spells, c, "", 1)
			},
			sortFunc : function(b, c) {
				if (!b.spells || !c.spells)
					return 0;
				return $WH.strcmp(b.spellCount, c.spellCount)
						|| $WH.strcmp(b.spells, c.spells)
			},
			hidden : !0
		}, {
			id : "diet",
			name : LANG.diet,
			type : "text",
			compute : function(b, c) {
				if (c)
					c.className = "small";
				var e = 0, f = "", g;
				for (g in g_pet_foods)
					b.diet
							& g
							&& (e++ > 0 && (f += LANG.comma), f += g_pet_foods[g]);
				return f
			},
			sortFunc : function(b, c) {
				return $WH.strcmp(c.foodCount, b.foodCount)
						|| Listview.funcBox.assocArrCmp(b.diet, c.diet,
								g_pet_foods)
			}
		}, {
			id : "type",
			name : LANG.type,
			type : "text",
			compute : function(b, c) {
				if (b.type != null) {
					c.className = $WH.isset("g_thottbot") && g_thottbot
							? "small q"
							: "small q1";
					var e = $WH.ce("a");
					e.href = "/pets=" + b.type;
					$WH.ae(e, $WH.ct(g_pet_types[b.type]));
					$WH.ae(c, e)
				}
			},
			getVisibleText : function(b) {
				if (b.type != null)
					return g_pet_types[b.type]
			},
			sortFunc : function(b, c) {
				return $WH.strcmp(g_pet_types[b.type], g_pet_types[c.type])
			}
		}],
		getItemLink : function(b) {
			return "/pet=" + b.id
		},
		getStatPct : function(b) {
			var c = $WH.ce("span");
			if (!isNaN(b) && b > 0)
				c.className = "q2", $WH.ae(c, $WH.ct("+" + b + "%"));
			else if (!isNaN(b) && b < 0)
				c.className = "q10", $WH.ae(c, $WH.ct(b + "%"));
			return c
		}
	},
	achievement : {
		sort : [1, 2],
		nItemsPerPage : 100,
		searchable : 1,
		filtrable : 1,
		columns : [{
			id : "name",
			name : LANG.name,
			type : "text",
			align : "left",
			value : "name",
			span : 2,
			compute : function(b, c, e) {
				var f = null;
				b.who
						&& b.completed
						&& (f = "who=" + b.who + "&when="
								+ b.completed.getTime());
				var g = $WH.ce("td");
				g.style.width = "1px";
				g.style.padding = "0";
				g.style.borderRight = "none";
				$WH.ae(g, g_achievements.createIcon(b.id, 1));
				Icon.getLink(g.firstChild).href = this.getItemLink(b);
				Icon.getLink(g.firstChild).rel = f;
				$WH.ae(e, g);
				c.style.borderLeft = "none";
				e = $WH.ce("a");
				e.style.fontFamily = "Verdana, sans-serif";
				e.href = this.getItemLink(b);
				e.rel = f;
				$WH.ae(e, $WH.ct(b.name));
				$WH.ae(c, e);
				if (b.description != null)
					f = $WH.ce("div"), f.className = "small", $WH.ae(f, $WH
									.ct(b.description)), $WH.ae(c, f)
			},
			getVisibleText : function(b) {
				var c = b.name;
				b.description && (c += " " + b.description);
				return c
			}
		}, {
			id : "side",
			name : LANG.side,
			type : "text",
			compute : function(b, c) {
				if (b.side && b.side != 3) {
					var e = $WH.ce("span");
					e.className = b.side == 1 ? "icon-alliance" : "icon-horde";
					e.onmouseover = function(c) {
						$WH.Tooltip.showAtCursor(c, g_sides[b.side], 0, 0, "q")
					};
					e.onmousemove = $WH.Tooltip.cursorUpdate;
					e.onmouseout = $WH.Tooltip.hide;
					$WH.ae(c, e)
				}
			},
			getVisibleText : function(b) {
				if (b.side)
					return g_sides[b.side]
			},
			sortFunc : function(b, c) {
				return $WH.strcmp(g_sides[b.side], g_sides[c.side])
			}
		}, {
			id : "points",
			name : LANG.points,
			type : "number",
			width : "10%",
			value : "points",
			compute : function(b, c) {
				b.points
						&& Listview.funcBox.appendMoney(c, 0, null, 0, 0,
								b.points)
			}
		}, {
			id : "rewards",
			name : LANG.rewards,
			type : "text",
			width : "20%",
			compute : function(b, c) {
				if (b.rewards) {
					for (var e = [], f = [], g = [], h = 0; h < b.rewards.length; h++)
						b.rewards[h][0] == 11
								? g.push(b.rewards[h][1])
								: b.rewards[h][0] == 3
										? e.push(b.rewards[h][1])
										: b.rewards[h][0] == 6
												&& f.push(b.rewards[h][1]);
					if (e.length > 0)
						for (h = 0; h < e.length; h++) {
							if (!g_items[e[h]])
								return;
							var j = g_items[e[h]], k = $WH.ce("a");
							k.href = link_178db("item", e[h]);
							k.className = "q" + j.quality + " icontiny";
							k.style.backgroundImage = "url(" + g_staticUrl
									+ "/images/wow/icons/tiny/"
									+ j.icon.toLowerCase() + ".gif)";
							$WH.ae(k, $WH.ct(j["name_" + Locale.getName()]));
							j = $WH.ce("span");
							$WH.ae(j, k);
							$WH.ae(c, j);
							$WH.ae(c, $WH.ce("br"))
						}
					if (f.length > 0)
						for (h = 0; h < f.length; h++) {
							if (!g_spells[f[h]])
								return;
							j = g_spells[f[h]];
							k = $WH.ce("a");
							k.href = link_178db("spell", f[h]);
							k.className = "q8 icontiny";
							k.style.backgroundImage = "url(" + g_staticUrl
									+ "/images/wow/icons/tiny/"
									+ j.icon.toLowerCase() + ".gif)";
							$WH.ae(k, $WH.ct(j["name_" + Locale.getName()]));
							j = $WH.ce("span");
							$WH.ae(j, k);
							$WH.ae(c, j);
							$WH.ae(c, $WH.ce("br"))
						}
					if (g.length > 0)
						for (h = 0; h < g.length; h++) {
							if (!g_titles[g[h]])
								break;
							e = g_titles[g[h]]["name_" + Locale.getName()];
							e = e.replace("%s", '<span class="q0">&lt;'
											+ LANG.name + "&gt;</span>");
							j = $WH.ce("a");
							j.className = $WH.isset("g_thottbot") && g_thottbot
									? "q"
									: "q1";
							j.href = "/title=" + g[h];
							j.innerHTML = e;
							$WH.ae(c, j);
							$WH.ae(c, $WH.ce("br"))
						}
				} else if (b.reward)
					j = $WH.ce("span"), j.className = $WH.isset("g_thottbot")
							&& g_thottbot ? "q" : "q1", $WH.ae(j, $WH
									.ct(b.reward)), $WH.ae(c, j)
			},
			getVisibleText : function(b) {
				var c = "";
				if (b.rewards)
					for (var e = 0; e < b.rewards.length; e++)
						b.rewards[e][0] == 11
								? c += " "
										+ g_titles[b.rewards[e][1]]["name_"
												+ Locale.getName()].replace(
												"%s", "<" + LANG.name + ">")
								: b.rewards[e][0] == 3
										? c += " "
												+ g_items[b.rewards[e][1]]["name_"
														+ Locale.getName()]
										: b.rewards[e][0] == 6
												&& (c += " "
														+ g_spells[b.rewards[e][1]]["name_"
																+ Locale
																		.getName()]);
				else
					b.reward && (c += " " + b.reward);
				return c
			},
			sortFunc : function(b, c) {
				var e = this.getVisibleText(b), f = this.getVisibleText(c);
				if (e != "" && f == "")
					return -1;
				if (f != "" && e == "")
					return 1;
				return $WH.strcmp(e, f)
			}
		}, {
			id : "category",
			name : LANG.category,
			type : "text",
			width : "15%",
			compute : function(b, c) {
				c.className = "small";
				var e = {
					1 : -1,
					2 : 1,
					3 : 15076
				}, f = "/achievements=";
				if (b.category != e[b.type] && b.parentcat != e[b.type])
					f = $WH.ce("a"), f.className = "q0", f.href = "/achievements="
							+ b.type + "." + b.parentcat, $WH.ae(f, $WH
									.ct(g_achievement_categories[b.parentcat])), $WH
							.ae(c, f), $WH.ae(c, $WH.ce("br")), f = f.href
							+ ".";
				e = $WH.ce("a");
				e.className = $WH.isset("g_thottbot") && g_thottbot
						? "q"
						: "q1";
				e.href = f + b.category;
				$WH.ae(e, $WH.ct(g_achievement_categories[b.category]));
				$WH.ae(c, e)
			},
			getVisibleText : function(b) {
				return g_achievement_categories[b.category]
			},
			sortFunc : function(b, c) {
				return $WH.strcmp(g_achievement_categories[b.category],
						g_achievement_categories[c.category])
			},
			hidden : !0
		}],
		getItemLink : function(b) {
			return "/achievement=" + b.id
		}
	},
	title : {
		sort : [1],
		nItemsPerPage : -1,
		searchable : 1,
		filtrable : 1,
		columns : [{
			id : "name",
			name : LANG.name,
			type : "text",
			align : "left",
			value : "name",
			compute : function(b, c) {
				var e = $WH.ce("a"), f = $WH.ce("span"), g = $WH.ct($WH
						.str_replace(b.name, "%s", ""));
				c.style.fontFamily = "Verdana, sans-serif";
				e.href = this.getItemLink(b);
				b.who ? $WH.ae(f, $WH.ct(b.who)) : ($WH.ae(f, $WH.ct("<"
								+ LANG.name + ">")), f.className = "q0");
				b.name.indexOf("%s") > 0
						? ($WH.ae(e, g), $WH.ae(e, f))
						: b.name.indexOf("%s") == 0
								&& ($WH.ae(e, f), $WH.ae(e, g));
				b.expansion
						? (f = $WH.ce("span"), f.className = g_GetExpansionClassName(b.expansion), $WH
								.ae(f, e), $WH.ae(c, f))
						: $WH.ae(c, e)
			},
			sortFunc : function(b, c) {
				var e = $WH.trim(b.name.replace("%s", "").replace(
						/^[\s,]*(,|the|of the|of)/i, ""));
				bName = $WH.trim(c.name.replace("%s", "").replace(
						/^[\s,]*(,|the|of the|of)/i, ""));
				return $WH.strcmp(e, bName)
			},
			getVisibleText : function(b) {
				return b.name + Listview.funcBox.getExpansionText(b)
			}
		}, {
			id : "gender",
			name : LANG.gender,
			type : "text",
			value : "gender",
			compute : function(b, c) {
				if (b.gender && b.gender != 3) {
					var e = g_file_genders[b.gender - 1], f = $WH.ce("span");
					f.className = "icon-" + e;
					f.onmouseover = function(b) {
						$WH.Tooltip.showAtCursor(b, LANG[e], 0, 0, "q")
					};
					f.onmousemove = $WH.Tooltip.cursorUpdate;
					f.onmouseout = $WH.Tooltip.hide;
					$WH.ae(c, f)
				}
			},
			getVisibleText : function(b) {
				if (b.gender && b.gender != 3)
					return LANG[g_file_genders[b.gender - 1]]
			},
			sortFunc : function(b, c) {
				return $WH.strcmp(b.gender, c.gender)
			}
		}, {
			id : "side",
			name : LANG.side,
			type : "text",
			compute : function(b, c) {
				if (b.side && b.side != 3) {
					var e = $WH.ce("span");
					e.className = b.side == 1 ? "icon-alliance" : "icon-horde";
					e.onmouseover = function(c) {
						$WH.Tooltip.showAtCursor(c, g_sides[b.side], 0, 0, "q")
					};
					e.onmousemove = $WH.Tooltip.cursorUpdate;
					e.onmouseout = $WH.Tooltip.hide;
					$WH.ae(c, e)
				}
			},
			getVisibleText : function(b) {
				if (b.side)
					return g_sides[b.side]
			},
			sortFunc : function(b, c) {
				return $WH.strcmp(g_sides[b.side], g_sides[c.side])
			}
		}, {
			id : "source",
			name : LANG.source,
			type : "text",
			compute : function(b, c) {
				if (b.source) {
					$WH.nw(c);
					c.className = "small";
					c.style.lineHeight = "18px";
					var e = 0, f;
					for (f in b.source) {
						b.source[f].sort(function(b, c) {
									return c.s - b.s
								});
						for (var g = 0, h = b.source[f].length; g < h; ++g) {
							var j = b.source[f][g];
							if (!b.faction
									|| !(typeof j != "string" && j.s !== void 0
											&& j.s != -1 && j.s != 2
											- b.faction))
								if (e++ > 0 && $WH.ae(c, $WH.ce("br")), typeof j == "string")
									$WH.ae(c, $WH.ct(j));
								else if (j.t) {
									var k = $WH.ce("a");
									k.href = "/" + g_types[j.t] + "=" + j.ti;
									k.className = $WH.isset("g_thottbot")
											&& g_thottbot ? "q" : "q1";
									j.s == 1
											&& (k.className += " icon-alliance");
									j.s == 0 && (k.className += " icon-horde");
									if (j.t == 5)
										k.className += " icontiny", k.style.backgroundImage = "url("
												+ g_staticUrl
												+ "/images/wow/icons/tiny/quest_start.gif)";
									$WH.ae(k, $WH.ct(j.n));
									$WH.ae(c, k)
								}
						}
					}
				}
			},
			getVisibleText : function(b) {
				var c = "";
				if (b.source)
					for (var e in b.source)
						for (var f = 0, g = b.source[e].length; f < g; ++f) {
							var h = b.source[e][f];
							typeof h == "string" ? c += " " + h : h.t
									&& (c += " " + h.n)
						}
				return c
			},
			sortFunc : function(b, c) {
				return $WH.strcmp(this.getVisibleText(b), this
								.getVisibleText(c))
			}
		}, {
			id : "category",
			name : LANG.category,
			type : "text",
			width : "15%",
			compute : function(b, c) {
				$WH.nw(c);
				c.className = $WH.isset("g_thottbot") && g_thottbot
						? "small q"
						: "small q1";
				var e = $WH.ce("a");
				e.href = "/titles=" + b.category;
				$WH.ae(e, $WH.ct(g_title_categories[b.category]));
				$WH.ae(c, e)
			},
			getVisibleText : function(b) {
				return g_title_categories[b.category]
			},
			sortFunc : function(b, c) {
				return $WH.strcmp(g_title_categories[b.category],
						g_title_categories[c.category])
			},
			hidden : !0
		}],
		getItemLink : function(b) {
			return "/title=" + b.id
		}
	},
	profile : {
		sort : [],
		nItemsPerPage : 50,
		searchable : 1,
		filtrable : 1,
		columns : [{
			id : "name",
			name : LANG.name,
			value : "name",
			type : "text",
			align : "left",
			span : 2,
			compute : function(b, c, e) {
				if (b.level) {
					var f = $WH.ce("td");
					f.style.width = "1px";
					f.style.padding = "0";
					f.style.borderRight = "none";
					$WH.ae(f, Icon.create($WH.g_getProfileIcon(b.race,
											b.classs, b.gender, b.level, b.icon
													? b.icon
													: b.id, "medium"), 1, null,
									this.getItemLink(b)));
					$WH.ae(e, f);
					c.style.borderLeft = "none"
				} else
					c.colSpan = 2;
				f = $WH.ce("div");
				f.style.position = "relative";
				var g = $WH.ce("a");
				g.style.fontFamily = "Verdana, sans-serif";
				g.href = this.getItemLink(b);
				if (b.pinned)
					g.className = "icon-star-right";
				$WH.ae(g, $WH.ct(b.name));
				$WH.ae(f, g);
				var h = $WH.ce("div");
				h.className = "small";
				h.style.marginRight = "20px";
				b.guild
						? (g = $WH.ce("a"), g.className = $WH
								.isset("g_thottbot")
								&& g_thottbot ? "q" : "q1", g.href = "/profiles="
								+ b.region
								+ "."
								+ b.realm
								+ "?filter=cr=9;crs=0;crv="
								+ $WH.str_replace($WH.urlencode(b.guild),
										"%20", "+") + "&roster=1", $WH.ae(g,
								$WH.ct(b.guild)), $WH.ae(h, $WH.ct("<")), $WH
								.ae(h, g), $WH.ae(h, $WH.ct(">")))
						: b.description && $WH.ae(h, $WH.ct(b.description));
				var g = $WH.ce("span"), j = "";
				g.className = "q10";
				if (b.deleted)
					j = LANG.lvcomment_deleted;
				$WH.ae(g, $WH.ct(j));
				$WH.ae(h, g);
				$WH.ae(f, h);
				h = $WH.ce("div");
				h.className = "small";
				h.style.fontStyle = "italic";
				h.style.position = "absolute";
				h.style.right = "3px";
				h.style.bottom = "0px";
				e.__status = h;
				b.published === 0 && $WH.ae(h, $WH.ct(LANG.privateprofile));
				$WH.ae(f, h);
				$WH.ae(c, f)
			},
			getVisibleText : function(b) {
				var c = b.name;
				b.guild && (c += " " + b.guild);
				return c
			}
		}, {
			id : "faction",
			name : LANG.faction,
			type : "text",
			compute : function(b, c) {
				if (b.size || b.members !== void 0 || b.level) {
					var e = $WH.ce("div"), f = $WH.ce("div"), g;
					g = Icon.create(
							"faction_" + g_file_factions[b.faction + 1], 0);
					g.onmouseover = function(c) {
						$WH.Tooltip.showAtCursor(c, g_sides[b.faction + 1], 0,
								0, "q")
					};
					g.onmousemove = $WH.Tooltip.cursorUpdate;
					g.onmouseout = $WH.Tooltip.hide;
					g.style.cssFloat = g.style.syleFloat = "left";
					e.style.margin = "0 auto";
					e.style.textAlign = "left";
					e.style.width = "26px";
					f.className = "clear";
					$WH.ae(e, g);
					$WH.ae(c, e);
					$WH.ae(c, f)
				}
			},
			getVisibleText : function(b) {
				return g_sides[b.faction + 1]
			},
			sortFunc : function(b, c) {
				return $WH.strcmp(this.getVisibleText(b), this
								.getVisibleText(c))
			}
		}, {
			id : "members",
			name : LANG.members,
			value : "members",
			hidden : 1
		}, {
			id : "size",
			name : "Size",
			value : "size",
			hidden : 1
		}, {
			id : "rank",
			name : "Rank",
			value : "rank",
			hidden : 1
		}, {
			id : "race",
			name : LANG.race,
			type : "text",
			compute : function(b, c) {
				if (b.race) {
					var e = $WH.ce("div"), f = $WH.ce("div"), g;
					g = Icon.create("race_" + g_file_races[b.race] + "_"
									+ g_file_genders[b.gender], 0, null,
							"/race=" + b.race);
					g.onmouseover = function(c) {
						$WH.Tooltip.showAtCursor(c, g_chr_races[b.race], 0, 0,
								"q")
					};
					g.onmousemove = $WH.Tooltip.cursorUpdate;
					g.onmouseout = $WH.Tooltip.hide;
					g.style.cssFloat = g.style.syleFloat = "left";
					e.style.margin = "0 auto";
					e.style.textAlign = "left";
					e.style.width = "26px";
					f.className = "clear";
					$WH.ae(e, g);
					$WH.ae(c, e);
					$WH.ae(c, f)
				}
			},
			getVisibleText : function(b) {
				return g_file_genders[b.gender] + " " + g_chr_races[b.race]
			},
			sortFunc : function(b, c) {
				return $WH.strcmp(g_chr_races[b.race], g_chr_races[c.race])
			},
			hidden : 1
		}, {
			id : "classs",
			name : LANG.classs,
			type : "text",
			compute : function(b, c) {
				if (b.classs) {
					var e = $WH.ce("div"), f = $WH.ce("div"), g;
					g = Icon.create("class_" + g_file_classes[b.classs], 0,
							null, "/class=" + b.classs);
					g.onmouseover = function(c) {
						$WH.Tooltip.showAtCursor(c, g_chr_classes[b.classs], 0,
								0, "q")
					};
					g.onmousemove = $WH.Tooltip.cursorUpdate;
					g.onmouseout = $WH.Tooltip.hide;
					g.style.cssFloat = g.style.syleFloat = "left";
					e.style.margin = "0 auto";
					e.style.textAlign = "left";
					e.style.width = "26px";
					f.className = "clear";
					$WH.ae(e, g);
					$WH.ae(c, e);
					$WH.ae(c, f)
				} else
					return -1
			},
			getVisibleText : function(b) {
				if (b.classs)
					return g_chr_classes[b.classs]
			},
			sortFunc : function(b, c) {
				return $WH.strcmp(this.getVisibleText(b), this
								.getVisibleText(c))
			},
			hidden : 1
		}, {
			id : "level",
			name : LANG.level,
			value : "level",
			hidden : 1
		}, {
			id : "talents",
			name : LANG.talents,
			type : "text",
			compute : function(b, c) {
				if (b.level) {
					var e = pr_getSpecFromTalents(b.classs, [b.talenttree1,
									b.talenttree2, b.talenttree3]), f = $WH
							.ce("a");
					f.className = "icontiny tip "
							+ ($WH.isset("g_thottbot") && g_thottbot
									? "q"
									: "q1");
					f.style.backgroundImage = "url(" + g_staticUrl
							+ "/images/wow/icons/tiny/" + e.icon.toLowerCase()
							+ ".gif)";
					f.href = this.getItemLink(b) + "#talents";
					f.rel = "np";
					f.onmouseover = function(b) {
						$WH.Tooltip.showAtCursor(b, e.name, 0, 0, "q")
					};
					f.onmousemove = $WH.Tooltip.cursorUpdate;
					f.onmouseout = $WH.Tooltip.hide;
					$WH.ae(f, $WH.ct(b.talenttree1 + "/" + b.talenttree2 + "/"
									+ b.talenttree3));
					$WH.ae(c, f)
				}
			},
			getVisibleText : function(b) {
				return b.talenttree1 || b.talenttree2 || b.talenttree3
						? b.talentspec > 0 ? g_chr_specs[b.classs][b.talentspec
								- 1] : g_chr_specs[0]
						: g_chr_specs["-1"]
			},
			sortFunc : function(b, c) {
				return $WH.strcmp(this.getVisibleText(b), this
								.getVisibleText(c))
			},
			hidden : 1
		}, {
			id : "gearscore",
			name : LANG.gearscore,
			tooltip : LANG.gearscore_real,
			value : "gearscore",
			compute : function(b, c) {
				var e = b.level ? b.level : b.members !== void 0 ? 80 : 0;
				if (!isNaN(b.gearscore) && e)
					return c.className = "q"
							+ pr_getGearScoreQuality(e, b.gearscore,
									$WH.in_array([2, 6, 7, 11], b.classs) != -1), b.gearscore
							? $WH.number_format(b.gearscore)
							: 0
			},
			hidden : 1
		}, {
			id : "achievementpoints",
			name : LANG.points,
			value : "achievementpoints",
			tooltip : LANG.tooltip_achievementpoints,
			compute : function(b, c) {
				b.achievementpoints
						&& Listview.funcBox.appendMoney(c, 0, null, 0, 0,
								b.achievementpoints)
			},
			hidden : 1
		}, {
			id : "wins",
			name : LANG.wins,
			value : "wins",
			hidden : 1
		}, {
			id : "losses",
			name : LANG.losses,
			compute : function(b) {
				return b.games - b.wins
			},
			hidden : 1
		}, {
			id : "guildrank",
			name : LANG.guildrank,
			value : "guildrank",
			compute : function(b, c) {
				if (b.guildrank > 0)
					return $WH.sprintf(LANG.rankno, b.guildrank);
				else if (b.guildrank == 0) {
					var e = $WH.ce("b");
					$WH.ae(e, $WH.ct(LANG.guildleader));
					$WH.ae(c, e)
				}
			},
			getVisibleText : function(b) {
				if (b.guildrank > 0)
					return $WH.sprintf(LANG.rankno, b.guildrank);
				else if (b.guildrank == 0)
					return LANG.guildleader
			},
			sortFunc : function(b, c) {
				return $WH.strcmp(b.guildrank >= 0 ? b.guildrank : 11,
						c.guildrank >= 0 ? c.guildrank : 11)
			},
			hidden : 1
		}, {
			id : "rating",
			name : LANG.rating,
			value : "rating",
			compute : function(b) {
				if (b.roster && b.arenateam[b.roster])
					return b.arenateam[b.roster].rating;
				return b.rating
			},
			sortFunc : function(b, c) {
				if (b.roster && b.arenateam[b.roster] && c.roster
						&& c.arenateam[c.roster])
					return $WH.strcmp(b.arenateam[b.roster].rating,
							c.arenateam[c.roster].rating);
				return $WH.strcmp(b.rating, c.rating)
			},
			hidden : 1
		}, {
			id : "location",
			name : LANG.location,
			type : "text",
			compute : function(b, c) {
				var e;
				if (b.region) {
					if (b.realm)
						e = $WH.ce("a"), e.className = $WH.isset("g_thottbot")
								&& g_thottbot ? "q" : "q1", e.href = "/profiles="
								+ b.region + "." + b.realm, $WH.ae(e, $WH
										.ct(b.realmname)), $WH.ae(c, e), $WH
								.ae(c, $WH.ce("br"));
					var f = $WH.ce("small");
					e = $WH.ce("a");
					e.className = $WH.isset("g_thottbot") && g_thottbot
							? "q"
							: "q1";
					e.href = "/profiles=" + b.region;
					$WH.ae(e, $WH.ct(b.region.toUpperCase()));
					$WH.ae(f, e);
					if (b.battlegroup)
						$WH.ae(f, $WH.ct(LANG.hyphen)), e = $WH.ce("a"), e.className = $WH
								.isset("g_thottbot")
								&& g_thottbot ? "q" : "q1", e.href = "/profiles="
								+ b.region + "." + b.battlegroup, $WH.ae(e, $WH
										.ct(b.battlegroupname)), $WH.ae(f, e);
					$WH.ae(c, f)
				}
			},
			getVisibleText : function(b) {
				var c = "";
				b.region && (c += " " + b.region);
				b.battlegroup && (c += " " + b.battlegroup);
				b.realm && (c += " " + b.realm);
				return $WH.trim(c)
			},
			sortFunc : function(b, c) {
				if (b.region != c.region)
					return $WH.strcmp(b.region, c.region);
				if (b.battlegroup != c.battlegroup)
					return $WH.strcmp(b.battlegroup, c.battlegroup);
				return $WH.strcmp(b.realm, c.realm)
			}
		}, {
			id : "guild",
			name : LANG.guild,
			value : "guild",
			type : "text",
			compute : function(b, c) {
				if (b.region && b.battlegroup && b.realm && b.guild) {
					var e = $WH.ce("a");
					e.className = $WH.isset("g_thottbot") && g_thottbot
							? "q"
							: "q1";
					e.href = "/profiles="
							+ b.region
							+ "."
							+ b.realm
							+ "?filter=cr=9;crs=0;crv="
							+ $WH.str_replace($WH.urlencode(b.guild), "%20",
									"+") + "&roster=1";
					$WH.ae(e, $WH.ct(b.guild));
					$WH.ae(c, e)
				}
			}
		}],
		getItemLink : function(b) {
			return b.size !== void 0
					? "/profiles="
							+ b.region
							+ "."
							+ b.realm
							+ "?filter=cr="
							+ (b.size == 2 ? 12 : b.size == 3 ? 15 : 18)
							+ ";crs=0;crv="
							+ $WH
									.str_replace($WH.urlencode(b.name), "%20",
											"+") + "&roster="
							+ (b.size == 5 ? 4 : b.size)
					: b.members !== void 0
							? "/profiles="
									+ b.region
									+ "."
									+ b.realm
									+ "?filter=cr=9;crs=0;crv="
									+ $WH.str_replace($WH.urlencode(b.name),
											"%20", "+") + "&roster=1"
							: g_getProfileUrl(b)
		}
	},
	model : {
		sort : [],
		mode : 3,
		nItemsPerPage : 40,
		nItemsPerRow : 4,
		poundable : 2,
		columns : [],
		compute : function(b, c) {
			c.className = "screenshot-cell";
			c.vAlign = "bottom";
			var e = $WH.ce("a");
			e.href = "javascript:;";
			e.onclick = this.template.modelShow.bind(this.template, b.npcId,
					b.displayId, !1);
			var f = $WH.ce("img");
			f.src = g_staticUrl + "/modelviewer/thumbs/npc/" + b.displayId
					+ ".png";
			$WH.ae(e, f);
			$WH.ae(c, e);
			f = $WH.ce("div");
			f.className = "screenshot-cell-user";
			e = $WH.ce("a");
			e.href = "/npcs=1?filter="
					+ (b.family ? "fa=" + b.family + ";" : "")
					+ "minle=1;cr=35;crs=0;crv=" + b.skin;
			$WH.ae(e, $WH.ct(b.skin));
			$WH.ae(f, e);
			$WH.ae(f, $WH.ct(" (" + b.count + ")"));
			$WH.ae(c, f);
			f = $WH.ce("div");
			f.style.position = "relative";
			f.style.height = "1em";
			e = $WH.ce("div");
			e.className = "screenshot-caption";
			var g = $WH.ce("small");
			$WH.ae(g, $WH.ct(LANG.level + ": "));
			$WH.ae(g, $WH
							.ct(b.minLevel
									+ (b.minLevel == b.maxLevel
											? ""
											: LANG.hyphen
													+ (b.maxLevel == 9999
															? "??"
															: b.maxLevel))));
			$WH.ae(g, $WH.ce("br"));
			$WH.ae(e, g);
			$WH.ae(f, e);
			$WH.ae(c, f);
			$WH.aE(c, "click", this.template.modelShow.bind(this.template,
							b.npcId, b.displayId, !0))
		},
		modelShow : function(b, c, e, f) {
			if (e) {
				f = $WH.$E(f);
				if (f.shiftKey || f.ctrlKey)
					return;
				for (e = f._target; e;) {
					if (e.nodeName == "A")
						return;
					if (e.nodeName == "IMG")
						break;
					e = e.parentNode
				}
			}
			ModelViewer.show({
						type : 1,
						typeId : b,
						displayId : c,
						noPound : 1
					})
		}
	},
	currency : {
		sort : [1],
		searchable : 1,
		filtrable : 1,
		columns : [{
					id : "name",
					name : LANG.name,
					type : "text",
					align : "left",
					span : 2,
					value : "name",
					compute : function(b, c, e) {
						var f = $WH.ce("td");
						f.style.width = "1px";
						f.style.padding = "0";
						f.style.borderRight = "none";
						$WH.ae(f, Icon.create(b.icon, 0, null, this
												.getItemLink(b)));
						$WH.ae(e, f);
						c.style.borderLeft = "none";
						e = $WH.ce("div");
						f = $WH.ce("a");
						f.style.fontFamily = "Verdana, sans-serif";
						f.href = this.getItemLink(b);
						$WH.ae(f, $WH.ct(b.name));
						$WH.ae(e, f);
						$WH.ae(c, e)
					}
				}, {
					id : "category",
					name : LANG.category,
					type : "text",
					width : "15%",
					compute : function(b, c) {
						c.className = "small";
						var e = $WH.ce("a");
						e.className = $WH.isset("g_thottbot") && g_thottbot
								? "q"
								: "q1";
						e.href = "/currencies=" + b.category;
						$WH.ae(e, $WH.ct(g_currency_categories[b.category]));
						$WH.ae(c, e)
					},
					getVisibleText : function(b) {
						return g_currency_categories[b.category]
					},
					sortFunc : function(b, c) {
						return $WH.strcmp(g_currency_categories[b.category],
								g_currency_categories[c.category])
					}
				}],
		getItemLink : function(b) {
			return "/currency=" + b.id
		}
	},
	classs : {
		sort : [1],
		searchable : 1,
		filtrable : 1,
		columns : [{
			id : "name",
			name : LANG.name,
			type : "text",
			align : "left",
			span : 2,
			value : "name",
			compute : function(b, c, e) {
				var f = $WH.ce("td");
				f.style.width = "1px";
				f.style.padding = "0";
				f.style.borderRight = "none";
				$WH.ae(f, Icon.create("class_" + g_file_classes[b.id], 0, null,
								this.getItemLink(b)));
				$WH.ae(e, f);
				c.style.borderLeft = "none";
				e = $WH.ce("div");
				f = $WH.ce("a");
				f.className = "c" + b.id;
				f.style.fontFamily = "Verdana, sans-serif";
				f.href = this.getItemLink(b);
				$WH.ae(f, $WH.ct(b.name));
				if (b.expansion) {
					var g = $WH.ce("span");
					g.className = g_GetExpansionClassName(b.expansion);
					$WH.ae(g, f);
					$WH.ae(e, g)
				} else
					$WH.ae(e, f);
				if (b.hero)
					e.style.position = "relative", b = $WH.ce("div"), b.className = "small", b.style.fontStyle = "italic", b.style.position = "absolute", b.style.right = "3px", b.style.bottom = "0px", $WH
							.ae(b, $WH.ct(LANG.lvclass_hero)), $WH.ae(e, b);
				$WH.ae(c, e)
			}
		}, {
			id : "races",
			name : LANG.races,
			type : "text",
			compute : function(b, c) {
				if (b.races) {
					var e = Listview.funcBox
							.assocBinFlags(b.races, g_chr_races);
					c.className = $WH.isset("g_thottbot") && g_thottbot
							? "q"
							: "q1";
					for (var f = 0, g = e.length; f < g; ++f) {
						f > 0 && $WH.ae(c, $WH.ct(LANG.comma));
						var h = $WH.ce("a");
						h.href = "/race=" + e[f];
						$WH.ae(h, $WH.ct(g_chr_races[e[f]]));
						$WH.ae(c, h)
					}
				}
			},
			getVisibleText : function(b) {
				if (b.races)
					return Listview.funcBox.arrayText(Listview.funcBox
									.assocBinFlags(b.races, g_chr_races),
							g_chr_races)
			},
			sortFunc : function(b, c) {
				return Listview.funcBox.assocArrCmp(Listview.funcBox
								.assocBinFlags(b.races, g_chr_races),
						Listview.funcBox.assocBinFlags(c.races, g_chr_races),
						g_chr_races)
			}
		}],
		getItemLink : function(b) {
			return "/class=" + b.id
		}
	},
	race : {
		sort : [1],
		searchable : 1,
		filtrable : 1,
		columns : [{
			id : "name",
			name : LANG.name,
			type : "text",
			align : "left",
			span : 2,
			value : "name",
			compute : function(b, c, e) {
				var f = $WH.ce("div"), g;
				f.style.margin = "0 auto";
				f.style.textAlign = "left";
				f.style.width = "52px";
				g = Icon.create("race_" + g_file_races[b.id] + "_"
								+ g_file_genders[0], 0, null, this
								.getItemLink(b));
				g.style.cssFloat = g.style.styleFloat = "left";
				$WH.ae(f, g);
				g = Icon.create("race_" + g_file_races[b.id] + "_"
								+ g_file_genders[1], 0, null, this
								.getItemLink(b));
				g.style.cssFloat = g.style.styleFloat = "left";
				$WH.ae(f, g);
				g = $WH.ce("td");
				g.style.width = "1px";
				g.style.padding = "0";
				g.style.borderRight = "none";
				$WH.ae(g, f);
				$WH.ae(e, g);
				c.style.borderLeft = "none";
				e = $WH.ce("div");
				f = $WH.ce("a");
				f.style.fontFamily = "Verdana, sans-serif";
				f.href = this.getItemLink(b);
				$WH.ae(f, $WH.ct(b.name));
				b.expansion
						? (g = $WH.ce("span"), g.className = g_GetExpansionClassName(b.expansion), $WH
								.ae(g, f), $WH.ae(e, g))
						: $WH.ae(e, f);
				$WH.ae(c, e)
			}
		}, {
			id : "side",
			name : LANG.side,
			type : "text",
			compute : function(b, c) {
				if (b.side && b.side != 3) {
					var e = $WH.ce("span");
					e.className = b.side == 1 ? "icon-alliance" : "icon-horde";
					e.onmouseover = function(c) {
						$WH.Tooltip.showAtCursor(c, g_sides[b.side], 0, 0, "q")
					};
					e.onmousemove = $WH.Tooltip.cursorUpdate;
					e.onmouseout = $WH.Tooltip.hide;
					$WH.ae(c, e)
				}
			},
			getVisibleText : function(b) {
				if (b.side)
					return g_sides[b.side]
			},
			sortFunc : function(b, c) {
				return $WH.strcmp(g_sides[b.side], g_sides[c.side])
			}
		}, {
			id : "classes",
			name : LANG.classes,
			type : "text",
			compute : function(b, c) {
				if (b.classes) {
					var e = Listview.funcBox.assocBinFlags(b.classes,
							g_chr_classes), f = $WH.ce("div");
					f.style.width = 26 * e.length + "px";
					f.style.margin = "0 auto";
					for (var g = 0, h = e.length; g < h; ++g) {
						var j = Icon.create("class_" + g_file_classes[e[g]], 0,
								null, "/class=" + e[g]);
						j.style.cssFloat = j.style.styleFloat = "left";
						$WH.ae(f, j)
					}
					$WH.ae(c, f)
				}
			},
			getVisibleText : function(b) {
				if (b.classes)
					return Listview.funcBox.arrayText(Listview.funcBox
									.assocBinFlags(b.classes, g_chr_classes),
							g_chr_classes)
			},
			sortFunc : function(b, c) {
				return Listview.funcBox.assocArrCmp(Listview.funcBox
								.assocBinFlags(b.classes, g_chr_classes),
						Listview.funcBox
								.assocBinFlags(c.classes, g_chr_classes),
						g_chr_classes)
			}
		}],
		getItemLink : function(b) {
			return "/race=" + b.id
		}
	},
	relatedlinks : {
		sort : [1],
		nItemsPerPage : 75,
		columns : [{
			id : "subject",
			name : LANG.subject,
			align : "left",
			value : "subject",
			compute : function(b, c) {
				var e = $WH.ce("a");
				e.style.fontFamily = "Verdana, sans-serif";
				b.blog ? $(e).addClass("icon-book") : b.guide ? $(e)
						.addClass("icon-star") : $(e).addClass("icon-sticky");
				e.href = this.getItemLink(b);
				$WH.ae(e, $WH.ct(b.subject));
				$WH.ae(c, e);
				if (b.board) {
					var f = $WH.ce("div");
					f.className = "small";
					e = $WH.ce("a");
					e.className = "q1";
					e.href = "/forums&board=" + b.board;
					$WH.ae(e, $WH.ct(LANG.foboards[b.board]));
					$WH.ae(f, e);
					$WH.ae(c, f)
				}
			},
			sortFunc : function(b, c) {
				return -$WH.strcmp(b.guide, c.guide)
						|| $WH.strcmp(b.board ? 1 : 0, c.board ? 1 : 0)
						|| $WH.strcmp(b.subject, c.subject)
			}
		}, {
			id : "preview",
			name : LANG.preview,
			align : "left",
			width : "50%",
			value : "preview",
			compute : function(b, c) {
				var e = $WH.ce("div");
				e.className = "crop";
				$WH.ae(e, $WH.ct(Markup.removeTags(b.preview, {
									mode : Markup.MODE_ARTICLE,
									uid : b.id
								})));
				$WH.ae(c, e);
				if (b.user) {
					e = $WH.ce("div");
					e.className = "small3";
					$WH.ae(e, $WH.ct(LANG.lvtopic_by));
					var f = $WH.ce("a");
					f.href = "/user=" + b.user;
					$WH.ae(f, $WH.ct(b.user));
					$WH.ae(e, f);
					$WH.ae(c, e)
				}
			}
		}],
		getItemLink : function(b) {
			if (b.blog)
				return "/blog=" + b.id;
			return "/" + b.url
		}
	}
};
var LiveSearch = new function() {
	function b(b, c) {
		b.value = c;
		b.selectionStart = b.selectionEnd = c.length
	}
	function c(c, e) {
		if (u)
			u.className = u.className.replace("live-search-selected", "");
		u = c;
		u.className += " live-search-selected";
		e
				|| (h(), setTimeout(
						b
								.bind(
										0,
										t,
										g_getTextContent(c.firstChild.firstChild.childNodes[1])),
						1), da = 1)
	}
	function e() {
		c(this.parentNode.parentNode, 1)
	}
	function f() {
		if (!F)
			return !1;
		return F.style.display != "none"
	}
	function g(b) {
		if ((b != 1 || f()) && t != null)
			b = $WH.ac(t), F.style.left = b[0] - 2 + "px", F.style.top = b[1]
					+ t.offsetHeight + 1 + "px", F.style.width = t.offsetWidth
					+ "px"
	}
	function h() {
		F && !f() && (g(), $(F).css({
					opacity : "0"
				}).show().animate({
					opacity : "1"
				}, "fast", null, j))
	}
	function j() {
		$(this).css("opacity", "")
	}
	function k(b) {
		if ((!b || g_isLeftClick(b)) && F)
			F.style.display = "none"
	}
	function m(b, c) {
		return c ? b : "<b><u>" + b + "</u></b>"
	}
	function l(b, c) {
		var f = b.responseText;
		if (!(f.charAt(0) != "[" || f.charAt(f.length - 1) != "]")) {
			var j = eval(f), l = j[0];
			if (l == c.search)
				if (j.length == 8) {
					var f = c.textbox, o = l, l = j[1], j = j[7];
					if (!Aa)
						Aa = 1, F = $WH.ce("div"), F.className = "live-search", F.style.display = "none", $WH
								.ae(document.body, F), $WH.aE(window, "resize",
								g.bind(0, 1)), $WH.aE(document, "click", k);
					h();
					lastA = null;
					for (P = 1; F.firstChild;)
						$WH.de(F.firstChild);
					for (var o = o.replace(/[^a-z0-9\-]/gi, " "), o = $WH
							.trim(o.replace(/\s+/g, " ")), o = g_createOrRegex(
							o, o == "s" ? "[%]" : null), t = 0, z = l.length; t < z; ++t) {
						var q = l[t].lastIndexOf("(");
						q != -1 && (l[t] = l[t].substr(0, q - 1));
						var q = j[t][0], u = j[t][1], p = j[t][2], r = j[t][3], D = $WH
								.ce("a"), v = $WH.ce("i"), da = $WH.ce("span"), R = $WH
								.ce("div"), ea = $WH.ce("div");
						R.i = t;
						D.onmouseover = e;
						D.href = "/"
								+ (q == 10 && r ? "statistic" : g_types[q])
								+ "=" + u;
						f._append && (D.rel += f._append);
						q == 1 && p != null
								? R.className += " live-search-icon-boss"
								: q == 3 && r != null
										? D.className += " q" + r
										: q == 4 && p != null
												? D.className += " q" + p
												: q == 13
														&& (D.className += " c"
																+ u);
						if ((q == 3 || q == 6 || q == 9 || q == 10 || q == 13
								|| q == 14 || q == 15 || q == 17)
								&& p)
							R.className += " live-search-icon", R.style.backgroundImage = "url("
									+ icon_178db(p.toLowerCase(), "small")
									+ ")";
						else if ((q == 5 || q == 11) && p >= 1 && p <= 2)
							R.className += " live-search-icon-quest-"
									+ (p == 1 ? "alliance" : "horde");
						$WH.ae(v, $WH.ct(LANG.types[q][0]));
						$WH.ae(D, v);
						u = l[t];
						u = u.replace(o, m);
						q == 11
								&& (u = u.replace("%s", '<span class="q0">&lt;'
												+ LANG.name + "&gt;</span>"));
						da.innerHTML = u;
						$WH.ae(D, da);
						q == 6 && r && $WH.ae(D, $WH.ct(" (" + r + ")"));
						$WH.ae(ea, D);
						$WH.ae(R, ea);
						$WH.ae(F, R)
					}
				} else
					k()
		}
	}
	function o(b, c) {
		var e = "/search?q=" + $WH.urlencode(c);
		e += b._type ? "&json&type=" + b._type : "&opensearch";
		new Ajax(e, {
					onSuccess : l,
					textbox : b,
					search : c
				})
	}
	function q(b) {
		if (f()) {
			var e = F.childNodes[0].nodeName == "EM"
					? F.childNodes[3]
					: F.firstChild, e = b ? e : F.lastChild;
			if (u == null)
				c(e);
			else if (b = b ? u.nextSibling : u.previousSibling) {
				if (b.nodeName == "STRONG")
					b = F.lastChild;
				c(b)
			} else
				c(e)
		} else
			P && h()
	}
	function v(b) {
		var b = $WH.$E(b), b = b._target, c = $WH.trim(b.value.replace(/\s+/g,
				" "));
		c != z[b.id]
				&& (z[b.id] = c, c.length ? da ? da = 0 : (P = 0, D > 0
						&& (clearTimeout(D), D = 0), D = setTimeout(o.bind(0,
								b, c), Ha)) : k())
	}
	function p(b) {
		b = $WH.$E(b);
		switch (b.keyCode) {
			case 27 :
				k();
				break;
			case 38 :
				q(0);
				break;
			case 40 :
				q(1)
		}
	}
	function r(b) {
		b = $WH.$E(b);
		b = b._target;
		b != document && (t = b)
	}
	var t, z = {}, u, D, Aa, F, da, P, Ha = 500;
	this.attach = function(b) {
		b = $(b);
		b.length
				&& (b = b[0], b.getAttribute("autocomplete") != "off"
						&& (b.setAttribute("autocomplete", "off"), $WH.aE(b,
								"focus", r), $WH.aE(b, "keyup", v), $WH.aE(b,
								"keydown", p)))
	};
	this.reset = function(b) {
		z[b.id] = null;
		b.value = "";
		P = 0;
		k()
	};
	this.hide = function() {
		k()
	}
}, PageTemplate = new function() {
	function b(b) {
		var c = [];
		g_user.characters.sort(function(b, c) {
					return $WH.strcmp(b.realmname, c.realmname)
							|| $WH.strcmp(b.region, c.region)
							|| $WH.strcmp(b.name, c.name)
				});
		var e;
		jQuery.each(g_user.characters, function(b, f) {
					var g = f.region + f.realm;
					if (g != e) {
						var h = [
								,
								f.realmname + " (" + f.region.toUpperCase()
										+ ")", g_getProfileRealmUrl(f)];
						c.push(h);
						e = g
					}
					g = [f.id, f.name, g_getProfileUrl(f), null, {
						className : (f.pinned ? "icon-star-right " : "") + "c"
								+ f.classs,
						tinyIcon : $WH.g_getProfileIcon(f.race, f.classs,
								f.gender, f.level, f.id, "tiny")
					}];
					c.push(g)
				});
		b[MENU_IDX_SUB] = c
	}
	function c(b) {
		var c = [];
		g_user.profiles.sort(function(b, c) {
					return $WH.strcmp(b.name, c.name)
				});
		jQuery.each(g_user.profiles, function(b, e) {
					var f = [e.id, e.name, g_getProfileUrl(e), null, {
						className : "c" + e.classs,
						tinyIcon : $WH.g_getProfileIcon(e.race, e.classs,
								e.gender, e.level, e.icon, "tiny")
					}];
					c.push(f)
				});
		c.push([0, LANG.menu_newprofile, "/profile&new", null, {
					tinyIcon : "inv_misc_questionmark"
				}]);
		b[MENU_IDX_SUB] = c
	}
	function e() {
		$("#toplinks-feedback").attr("href", "javascript:;").click(function() {
					ContactTool.show()
				})
	}
	function f() {
		var b = location.pathname + location.search + location.hash, c = Locale
				.getId(), e = [];
		jQuery.each(Locale.getAllByName(), function(f, g) {
					var h = [g.id, g.description, "http://" + g.domain + b];
					if (g.id == c)
						h.checked = !0;
					e.push(h)
				})
	}
	function g() {
	}
	function h() {
		var b = $("#toptabs");
		b.length && (r = $("<dl/>"), jQuery.each(mn_path, function(b, c) {
					var e = $("<dt><a><span><big>" + c[MENU_IDX_NAME].charAt(0)
							+ "</big>" + c[MENU_IDX_NAME].substr(1)
							+ "</span></a></dt>"), f = e.children("a");
					Menu.linkifyItem(c, f);
					e.appendTo(r)
				}), j(), r.appendTo(b))
	}
	function j() {
		if (r) {
			var b = $("a", r);
			jQuery.each(mn_path, function(c, e) {
						var f = $(b.get(c));
						e[MENU_IDX_ID] == v.activeTab
								? (f.addClass("active"), Menu.remove(f))
								: (f.removeClass("active"), e[MENU_IDX_SUB]
										&& Menu.add(f, e[MENU_IDX_SUB]))
					})
		}
	}
	function k() {
		var b = $("#topbar div.topbar-buttons");
		if (b.length)
			switch (b.empty(), v.activeTab) {
				case 0 :
					Menu.addButtons(b, [
									[0, LANG.menu_browse, null, mn_database],
									Menu.findItem(mn_tools, [8]),
									Menu.findItem(mn_tools, [8, 4])]);
					break;
				case 1 :
					var c = [[, LANG.calculators],
							Menu.findItem(mn_tools, [0]),
							Menu.findItem(mn_tools, [2]),
							Menu.findItem(mn_tools, [3])];
					Menu.addButtons(b, Menu.implode(c));
					Menu.addButtons(b, Menu.implode(mn_tools.slice(3)));
					break;
				case 2 :
					Menu.addButtons(b, Menu.implode(mn_more));
					break;
				case 3 :
					Menu.addButtons(b, Menu.implode(mn_community));
					Menu.addButtons(b, [Menu.findItem(mn_tools, [8])]);
					break;
				case 4 :
					Menu.addButtons(b, Menu.implode(mn_staff))
			}
	}
	function m() {
		$("#sidebar, #header-expandsite").remove();
		$("#layout").hasClass("nosidebar") || $("#wrapper").animate({
					"margin-right" : "10px"
				}, 333, null, function() {
					$("#wrapper").css("margin-right", "0px");
					$("#layout").addClass("nosidebar")
				})
	}
	function l() {
		$(this).prev("form").submit().children("input").focus()
	}
	var o = "";
	$WH.isset("g_thottbot") && g_thottbot && (o = "/tb");
	this.init = function() {
		var j = $("#toplinks-user");
		if (j.length) {
			j.attr("href", "/user=" + g_user.name);
			var r = [];
			r.push(["user-page", LANG.userpage, "/user=" + g_user.name, null, {
						checkedUrl : RegExp("user=" + g_user.name + "$", "i")
					}]);
			r.push(["settings", LANG.settings,
					"https://" + window.location.hostname + "/account", null, {
						icon : g_staticUrl + "/images/icons" + o + "/cog.gif",
						checkedUrl : /account/i
					}]);
			g_user.characters
					&& g_user.characters.length
					&& r.push(["characters", LANG.tab_characters,
							"/user=" + g_user.name + "#characters", null, {
								onBeforeShow : b
							}]);
			g_user.profiles
					&& g_user.profiles.length
					&& r.push(["profiles", LANG.tab_profiles,
							"/user=" + g_user.name + "#profiles", null, {
								onBeforeShow : c
							}]);
			var u;
			g_user.premium
					|| (u = ["premium-upgarde", LANG.premiumupgrade,
							"/premium", null, {
								className : "q7",
								checkedUrl : /premium/i
							}], r.push(u));
			r.push(["sign-out", LANG.signout, "/account=signout"]);
			Menu.add(j, r);
			j.addClass("hassubmenu")
		}
		e();
		f();
		$("#header-expandsite").attr("href", "javascript:;").click(m);
		h();
		j = $("#topbar");
		j.length
				&& (j = $("div.topbar-search", j), ($WH.isset("g_thottbot")
						&& g_thottbot
						? $("<button>&gt;</button>")
						: $("<a></a>").attr("href", "javascript:;")).click(l)
						.appendTo(j), $("form", j)
						.submit(g_preventEmptyFormSubmission), LiveSearch
						.attach($("input", j)), k());
		p.appendTo($("#main-precontents"));
		$(document).ready(g);
		q = !0
	};
	this.get = function(b) {
		return v[b]
	};
	this.set = function(b) {
		if (b) {
			var c = {};
			$.extend(c, v);
			$.extend(v, b);
			v.activeTab = parseInt(v.activeTab);
			q && v.activeTab != c.activeTab && (j(), k())
		}
	};
	this.getBreadcrumb = function() {
		return p
	};
	this.updateBreadcrumb = function() {
	};
	this.expandBreadcrumb = function() {
		$WH.isset("g_thottbot") && g_thottbot ? p.children("span:last")
				.append(" &gt; ") : p.children("span:last")
				.addClass("breadcrumb-arrow");
		return $("<span/>").appendTo(p)
	};
	var q = !1, v = {}, p, r;
	p = $('<div class="breadcrumb"></div>');
	$WH.Browser.ie6 && $(document.documentElement).addClass("ie6 ie67 ie678");
	$WH.Browser.ie7 && $(document.documentElement).addClass("ie7 ie67 ie678");
	$WH.Browser.ie8 && $(document.documentElement).addClass("ie8 ie678")
}, RedButton = {
	create : function(b, c, e) {
		var f = $WH.ce("a"), g, h, j, k = $WH.ce("span");
		g = $WH.ce("em");
		bCSS3 || (h = $WH.ce("b"), j = $WH.ce("i"));
		f.href = "javascript:;";
		f.className = "button-red";
		f.target = "_self";
		bCSS3 || ($WH.ae(h, j), $WH.ae(g, h));
		$WH.ae(g, k);
		$WH.ae(f, g);
		RedButton.setText(f, b);
		RedButton.enable(f, c);
		RedButton.setFunc(f, e);
		return f
	},
	setText : function(b, c) {
		bCSS3 ? $WH.st(b.firstChild.childNodes[0], c) : ($WH.st(
				b.firstChild.childNodes[0].firstChild, c), $WH.st(
				b.firstChild.childNodes[1], c))
	},
	enable : function(b, c) {
		c || c == null ? b.className = b.className.replace(
				"button-red-disabled", "") : b.className
				.indexOf("button-red-disabled") == -1
				&& (b.className += " button-red-disabled")
	},
	setFunc : function(b, c) {
		$(b).unbind();
		c && $(b).click(c)
	}
}, LOCALE_ENUS = 0, LOCALE_FRFR = 2, LOCALE_DEDE = 3, LOCALE_ESES = 6, LOCALE_RURU = 7, LOCALE_ZHCN = 8, LOCALE_ZHTW = 9, Locale = {
	current : {},
	locales : {
		0 : {
			id : LOCALE_ENUS,
			name : "enus",
			domain : "www.wowhead.com",
			description : "English"
		},
		2 : {
			id : LOCALE_FRFR,
			name : "frfr",
			domain : "fr.wowhead.com",
			description : "Fran" + String.fromCharCode(231) + "ais"
		},
		3 : {
			id : LOCALE_DEDE,
			name : "dede",
			domain : "de.wowhead.com",
			description : "Deutsch"
		},
		6 : {
			id : LOCALE_ESES,
			name : "eses",
			domain : "es.wowhead.com",
			description : "Espa" + String.fromCharCode(241) + "ol"
		},
		7 : {
			id : LOCALE_RURU,
			name : "ruru",
			domain : "ru.wowhead.com",
			description : String.fromCharCode(1056, 1091, 1089, 1089, 1082,
					1080, 1081)
		},
		8 : {
			id : LOCALE_ZHCN,
			name : "zhcn",
			domain : "db.178.com",
			description : "\u7b80\u4f53\u4e2d\u6587"
		},
		9 : {
			id : LOCALE_ZHTW,
			name : "zhtw",
			domain : "db.178.com",
			description : "\u7e41\u4f53\u4e2d\u6587"
		}
	},
	getAll : function() {
		var b = [], c;
		for (c in Locale.locales)
			b.push(Locale.locales[c]);
		return b
	},
	getAllByName : function() {
		var b = Locale.getAll();
		b.sort(function(b, e) {
					return $WH.strcmp(b.description, e.description)
				});
		return b
	},
	getId : function() {
		return Locale.current.id
	},
	getName : function() {
		var b = Locale.getId();
		return Locale.locales[b].name
	},
	get : function() {
		var b = Locale.getId();
		return Locale.locales[b]
	},
	set : function(b) {
		$.extend(Locale.current, Locale.locales[b])
	}
};
Locale.set(LOCALE_ENUS);
var $WowheadTalentCalculator, tc_loaded = !1, tc_object, tc_classId = -1, tc_classIcons = {}, tc_build = "", tc_glyphs = "", _178db = "http://db.178.com/wow/cn/", cp178 = {};
function TalentCalc() {
	function b(b, c, e) {
		var f = y[s];
		if ((glyph = g_glyphs[c]) && Ha(b, glyph))
			f.glyphs[b] && (f.glyphItems[f.glyphs[b]] = 0), f.glyphs[b] = c, f.glyphItems[c] = 1, e
					|| (Oa(b), K())
	}
	function c() {
		var b = y[s];
		if (b.k > N)
			for (var c = E - 1; c >= 0; --c)
				for (var e = b[c].t.length - 1; e >= 0; --e)
					for (var f = b[c].t[e].k, g = 0; g < f; ++g)
						if (q(b[c].t[e]), b.k <= N)
							return
	}
	function e(b, c) {
		Z(-1, O ? 0 : fa);
		f(b, c)
	}
	function f(b, c) {
		B == G
				&& $WH.Tooltip.showAtCursor(c, LANG[O
								? "tc_rembon"
								: "tc_addbon"], null, null, "q")
	}
	function g(b, c) {
		pa(prompt($WH.sprintf(LANG.prompt_ratinglevel, ib, Ca), ga));
		h(b, c);
		K()
	}
	function h(b) {
		_tip.show('<span class="q">' + LANG.tooltip_changelevel + "</span>", b,
				!0)
	}
	function j(b, c, e, f) {
		u();
		_tip.show('<span class="q">' + c + "</span>", jQuery(e), f === !0 ? {
					pos : "bottomright"
				} : null)
	}
	function k() {
		var b, c, e;
		Ia = $WH.ce("div");
		Ia.className = "talentcalc-sidebar";
		b = $WH.ce("div");
		b.className = "talentcalc-sidebar-inner";
		ha = $WH.ce("div");
		ha.className = "talentcalc-sidebar-controls";
		ha.style.display = "none";
		c = $WH.ce("a");
		c.className = "talentcalc-button-reset icon-delete";
		c.href = "javascript:;";
		c.target = "_self";
		c.onclick = S.resetAll;
		$WH.ae(c, $WH.ct(LANG.tc_resetall));
		$WH.ae(ha, c);
		if (!talentData.id)
			c = qa = $WH.ce("a"), c.className = "icon-lock", c.href = "javascript:;", c.target = "_self", c.onclick = jb, $WH
					.ae(c, $WH.ct(LANG.tc_lock)), $WH.ae(ha, c);
		c = $WH.ce("div");
		c.className = "clear";
		$WH.ae(ha, c);
		$WH.ae(b, ha);
		c = $WH.ce("div");
		c.className = "talentcalc-sidebar-controls2";
		e = $WH.ce("a");
		e.className = "talentcalc-button-import";
		e.href = "javascript:;";
		e.target = "_self";
		e.onclick = I.profiler ? S.promptWhBuild : S.promptBlizzBuild;
		$WH.ae(e, $WH.ct(LANG.tc_import));
		$WH.ae(c, e);
		if (talentData.id)
			e.style.display = "none";
		e = kb = $WH.ce("a");
		e.className = "talentcalc-button-print icon-print";
		e.style.display = "none";
		e.href = "javascript:;";
		e.target = "_self";
		e.onclick = S.showSummary.bind(null, 1);
		$WH.ae(e, $WH.ct(LANG.tc_print));
		$WH.ae(c, e);
		if (B == ra)
			e = Pa = $WH.ce("a"), e.className = "talentcalc-button-print icon-add", e.style.display = "none", e.href = "javascript:;", e.target = "_self", e.onclick = S.getInGamePreview
					.bind(null, 1), $WH.ae(e, $WH.ct(LANG.tc_ingamepreview)), $WH
					.ae(c, e);
		if (talentData.id)
			e = qa = $WH.ce("a"), e.className = "icon-lock", e.href = location.href
					.replace(/([\&\?]*)id\=([0-9]+)([\&]*)/, ""), e.target = "_blank", e.onmouseover = j
					.bind(null, null, LANG.tc_178_tip_edit, e, !0), $(e).bind(
					"mouseover", function() {
						this.href = location.href.replace(
								/([\&\?]*)id\=([0-9]+)([\&]*)/, "")
					}), $WH.ae(e, $WH.ct(LANG.tc_lock)), $WH.ae(c, e);
		e = $WH.ce("div");
		e.className = "clear";
		$WH.ae(c, e);
		$WH.ae(b, c);
		c = $WH.ce("div");
		var f = $WH.ce("div");
		f.className = "block-bg";
		$WH.ae(f, c);
		if (B == ra) {
			ia = $WH.ce("div");
			ia.style.display = "none";
			c = $WH.ce("h3");
			$WH.ae(c, $WH.ct(LANG.tc_glyphs));
			$WH.ae(ia, c);
			e = $WH.ce("a");
			e.href = "javascript:;";
			e.target = "_self";
			e.onclick = S.resetGlyphs;
			g_addTooltip(e, LANG.tc_resetglyphs);
			$WH.ae(e, $WH.ct("[x]"));
			$WH.ae(c, e);
			for (var f = {
				1 : "major",
				2 : "minor",
				3 : "prime"
			}, g = 0, h = 0, k = L.length; h < k; ++h) {
				var l = L[h];
				if (J[l].length) {
					c = $WH.ce("div");
					c.className = "talentcalc-sidebar-" + f[l] + "glyphs";
					e = $WH.ce("b");
					e.className = "q9";
					$WH.ae(e, $WH.ct(g_item_glyphs[l]));
					$WH.ae(c, e);
					$WH.ae(ia, c);
					e = 0;
					var m = $WH.ce("table"), o = $WH.ce("tbody"), q, s, r, w, p;
					m.className = "icontab";
					for (var t = 0, u = J[l].length; t < u; ++t)
						if (q = $WH.ce("tr"), e = g + t, s = $WH.ce("th"), r = $WH
								.ce("td"), $WH.ae(q, s), $WH.ae(q, r), J[l][t])
							w = Icon.create("inventoryslot_empty", 0, null,
									"javascript:;"), w.target = "_self", p = Icon
									.getLink(w), lb[e] = w, $WH.ae(s, w), s = $WH
									.ce("a"), mb[e] = s, $WH.ae(r, s), s.target = p.target = "_blank", s.rel = p.rel = "np", s.onmousedown = p.onmousedown = $WH.rf, s.onclick = p.onclick = $WH.rf, g_onClick(
									s, Aa.bind(s, e)), s.onmouseover = Qa.bind(
									null, s, e), s.onmousemove = $WH.Tooltip.cursorUpdate, s.onmouseout = $WH.Tooltip.hide, g_onClick(
									p, Aa.bind(p, e)), p.onmouseover = Qa.bind(
									null, p, e, !0), p.onmouseout = $WH.Tooltip.hide, r.oncontextmenu = $WH.rf, $WH
									.ae(o, q);
					$WH.ae(m, o);
					$WH.ae(c, m);
					g += J[l].length
				}
			}
			$WH.ae(b, ia)
		}
		$WH.ae(Ia, b);
		$WH.ae(U, Ia)
	}
	function m() {
		var b = $("<div />").addClass("talentcalc-178cp").attr("id",
				"talentcalc-178cp"), c, e, f, g;
		b.appendTo($(U));
		cp178.selfCur = "untalented";
		c = RedButton.create(LANG.tc_178_save, !0);
		$(c).attr("target", "_self").addClass("talentcalc-178cp-switch").css(
				"display", "none").click(function() {
					tc_object.switch178cp()
				}).appendTo(b);
		cp178.btnSwitch = $(c);
		cp178.rec = c = $("<div />").attr("id", "talentcalc-178cp-untalented")
				.appendTo(b);
		e = $("<h3 />").appendTo(c);
		cp178.rectitleIcon = f = $("<span />").appendTo(e);
		g = $("<em />").appendTo(f);
		cp178.rectitle = f = $("<strong />").appendTo(e);
		e.append(document.createTextNode(" " + LANG.tc_178_recommended));
		cp178.reclinks = e = $("<ol />").appendTo(c);
		e = $("<div />").appendTo(c);
		f = RedButton.create(LANG.tc_178_btn_rank, !0);
		$(f).attr("href", "http://i.178.com/~talent.index.recommendResList/")
				.attr("target", "_blank").appendTo(e);
		_178.acc
				&& (e.append(document.createTextNode("  ")), f = RedButton
						.create(LANG.tc_178_btn_archive, !0), $(f).attr("href",
						"http://i.178.com/~talent.index.index/").attr("target",
						"_blank").appendTo(e));
		if (talentData.id) {
			cp178.selfCur = "talented";
			cp178.btnSwitch.css("display", "block");
			cp178.rec.css("height", "0");
			b.addClass("talentcalc-178cp-saved");
			cp178.save = $("<div />").attr("id", "talentcalc-178cp-talented")
					.appendTo(b);
			c = $("<div />").addClass("talentcalc-178cp-saved-title")
					.appendTo(cp178.save);
			e = Icon
					.create(
							"http://cimg.178.com/wow/images/talent/icons178/medium/"
									+ talentData.icon + ".jpg", 1, null,
							"javascript:;");
			e.target = "_self";
			$(e).appendTo(c);
			$("<h2 />").text(talentData.title).appendTo(c);
			e = $("<span />").appendTo(c);
			$("<a />").attr({
				href : "http://i.178.com/~talent.index.index/uid/"
						+ talentData.user_id[0].uid + "/",
				target : "_blank"
			}).html(talentData.user_id[0].username).bind("mouseover",
					function() {
						_tip
								.show(
										LANG.tc_178_tip_viewusermore
												.replace(
														"$1",
														'<br /><span class="q">'
																+ talentData.user_id[0].username
																+ "</span>")
												+ '<span class="icon-frame frame-50" style="background-image:url('
												+ _user
														.getAvatar(
																talentData.user_id[0].uid,
																50)
												+ ');"></span>', this, !0)
					}).appendTo(e);
			f = new Date(new Number(talentData.create_time + "000"));
			e.append(document.createTextNode(LANG.tc_178_saved_creaton.replace(
					"$1", f.getFullYear()).replace("$2", f.getMonth() + 1)
					.replace("$3", f.getDate())));
			c = $("<div />").addClass("talentcalc-178cp-saved-info")
					.appendTo(cp178.save);
			$("<div />").addClass("talentcalc-178cp-saved-info-left")
					.html(LANG.tc_178_saved_version + ":<strong>"
							+ talentData.version + "</strong>").appendTo(c);
			g = [!1, LANG.tc_178_save_leveling, LANG.tc_178_save_pve,
					LANG.tc_178_save_pvp];
			e = $("<div />").addClass("talentcalc-178cp-saved-info-right")
					.html(LANG.tc_178_saved_purpose + ":").appendTo(c);
			f = $("<strong />").appendTo(e);
			$("<a />").attr({
				href : "http://i.178.com/~talent.index.recommendResList?class="
						+ talentData["class"] + "&type=" + talentData.purpose,
				target : "_blank"
			}).bind("mouseover", function() {
				_tip.show(LANG.tc_178_tip_viewtypemore.replace(
								"$1",
								'<span class="q">'
										+ g_chr_classes[talentData["class"]]
										+ "</span>").replace(
								"$2",
								'<span class="q">' + g[talentData.purpose]
										+ "</span>"), this, !0)
			}).text(g[talentData.purpose]).appendTo(f);
			$("<div />").addClass("clear").appendTo(c);
			$("<div />").addClass("talentcalc-178cp-saved-info-center")
					.html(LANG.tc_178_saved_des
							+ ":<strong>"
							+ (talentData.description
									? talentData.description
									: '<span class="q0">\u65e0</span>')
							+ "</strong>").appendTo(c);
			$("<div />").addClass("talentcalc-178cp-saved-info-left")
					.html(LANG.tc_178_saved_pop
							+ ":"
							+ LANG.tc_178_saved_pop2.replace("$1", "<strong>"
											+ talentData.total + "</strong>"))
					.appendTo(c);
			e = $("<div />").addClass("talentcalc-178cp-saved-info-right")
					.html(LANG.tc_178_saved_rating + ":").appendTo(c);
			cp178.vote = new Number(talentData.up)
					- new Number(talentData.down);
			cp178.voteNum = $("<strong />").html(cp178.vote).appendTo(e);
			cp178.voted = !1;
			cp178.voteUpTip = LANG.tc_178_tip_thumbup;
			cp178.voteDownTip = LANG.tc_178_tip_thumbdown;
			if (_178.acc)
				cp178.voteUp = $("<a />")
						.attr({
									href : "javascript:;",
									target : "_self"
								})
						.addClass("talentcalc-178cp-saved-thumb talentcalc-178cp-saved-thumb-up")
						.bind("mouseover", function() {
									_tip.show(cp178.voteUpTip, this, !0)
								}).bind("click", function() {
									tc_178thumb("1")
								}).text(LANG.tc_178_saved_up).appendTo(e), cp178.voteDown = $("<a />")
						.attr({
									href : "javascript:;",
									target : "_self"
								})
						.addClass("talentcalc-178cp-saved-thumb talentcalc-178cp-saved-thumb-down")
						.bind("mouseover", function() {
									_tip.show(cp178.voteDownTip, this, !0)
								}).bind("click", function() {
									tc_178thumb("2")
								}).html("&nbsp;").appendTo(e);
			$("<div />").addClass("clear").appendTo(c);
			e = $("<div />").appendTo(cp178.save);
			f = RedButton.create(LANG.tc_178_btn_modify, !0);
			$(f).attr("href",
					location.href.replace(/([\&\?]*)id\=([0-9]+)([\&]*)/, ""))
					.attr("target", "_blank").appendTo(e);
			e.append(document.createTextNode("  "));
			f = RedButton.create(LANG.tc_178_save, !0);
			$(f).attr("href",
					location.href.replace(/([\&\?]*)id\=([0-9]+)([\&]*)/, ""))
					.attr("target", "_blank").appendTo(e)
		} else
			cp178.save = c = $("<div />").attr("id",
					"talentcalc-178cp-talented").css("height", "0").appendTo(b), e = $("<h3 />")
					.html(LANG.tc_178_save).appendTo(c), _178.acc
					? (cp178.saveForm = e = $("<form />").attr({
						action : "http://i.178.com/~talent.index.addResInterface",
						target : "global-hidiframe",
						method : "post"
					}).submit(function() {
								return tc_178saveformcheck()
							}).appendTo(c), $("<input />").attr({
								name : "act",
								type : "hidden",
								value : "add"
							}).appendTo(e), cp178.saveFormIcon = $("<input />")
							.attr({
										name : "icon",
										type : "hidden",
										value : ""
									}).appendTo(e), cp178.saveFormTalent = $("<input />")
							.attr({
										name : "talent",
										type : "hidden",
										value : ""
									}).appendTo(e), $("<input />").attr({
								name : "version",
								type : "hidden",
								value : talentVER[0]
							}).appendTo(e), cp178.saveFormPoint = $("<input />")
							.attr({
										name : "point",
										type : "hidden",
										value : "0/0/0"
									}).appendTo(e), $("<input />").attr({
								name : "game",
								type : "hidden",
								value : talentLANG == "zhCN" ? "" : "2"
							}).appendTo(e), f = $("<div />").appendTo(e), $("<span />")
							.html(LANG.tc_178_save_name).appendTo(f), cp178.saveFormTitle = $("<input />")
							.attr("type", "text").attr("name", "title").bind(
									"focus", function() {
										jQuery(this).addClass("focused")
									}).bind("blur", function() {
										jQuery(this).removeClass("focused")
									}).appendTo(f), f = $("<div />")
							.appendTo(e), $("<span />")
							.html(LANG.tc_178_save_purpose).appendTo(f), g = $("<label />")
							.attr("for", "talentcalc-178cp-save-purpose1")
							.appendTo(f), $("<input />").attr({
								id : "talentcalc-178cp-save-purpose1",
								name : "purpose",
								type : "radio",
								value : "1",
								checked : "checked"
							}).appendTo(g), g.append(document
							.createTextNode(LANG.tc_178_save_leveling)), g = $("<label />")
							.attr("for", "talentcalc-178cp-save-purpose2")
							.appendTo(f), $("<input />").attr({
								id : "talentcalc-178cp-save-purpose2",
								name : "purpose",
								type : "radio",
								value : "2"
							}).appendTo(g), g.append(document
							.createTextNode(LANG.tc_178_save_pve)), g = $("<label />")
							.attr("for", "talentcalc-178cp-save-purpose3")
							.appendTo(f), $("<input />").attr({
								id : "talentcalc-178cp-save-purpose3",
								name : "purpose",
								type : "radio",
								value : "3"
							}).appendTo(g), g.append(document
							.createTextNode(LANG.tc_178_save_pvp)), f = $("<div />")
							.appendTo(e), $("<span />")
							.html(LANG.tc_178_save_des).appendTo(f), cp178.saveFormDes = $("<textarea />")
							.attr("name", "comment").bind("focus", function() {
										jQuery(this).addClass("focused")
									}).bind("blur", function() {
										jQuery(this).removeClass("focused")
									}).appendTo(f), f = $("<p />").appendTo(e), $("<span />")
							.html(LANG.tc_178_save_icon).appendTo(f), cp178.saveFormIconSel = Icon
							.create("inv_misc_questionmark", 1, null,
									"javascript:;"), cp178.saveFormIconSel.target = "_self", $(cp178.saveFormIconSel)
							.click(function() {
										Lightbox.show("iconpicker", {
													onShow : tc_178saveformshowicon
												})
									}).bind("mouseover", function() {
										_tip.show(LANG.tc_178_save_iconhelp,
												this, !0)
									}).appendTo(f), e = $("<div />")
							.appendTo(c), cp178.saveFormBtn = f = RedButton
							.create(LANG.tc_178_save, !0), $(f).attr("target",
							"_self").click(function() {
								cp178.saveForm.submit()
							}).appendTo(e), cp178.saveFormSubmitting = !1)
					: (e = $("<h4 />").html(LANG.tc_178_unlogged).appendTo(c), e = $("<p />")
							.html(LANG.tc_178_unlogged_des).appendTo(c), e = $("<div />")
							.appendTo(c), f = RedButton.create(
							LANG.tc_178_login, !0), $(f).attr(
							"href",
							"http://i.178.com/~index.index.login?to="
									+ encodeURIComponent(location.href)).attr(
							"target", "_self").attr("id",
							"talentcalc-178cp-btn-login").appendTo(e), e = $("<div />")
							.html(LANG.tc_178_or + " ").appendTo(c), f = $("<a />")
							.html(LANG.tc_178_register)
							.attr(
									"href",
									"http://account.178.com/?p=register&to="
											+ encodeURIComponent(location.href))
							.attr("target", "_self").attr("id",
									"talentcalc-178cp-btn-reg").appendTo(e)), cp178.alert = c = $("<div />")
					.attr("id", "talentcalc-178cp-alert").appendTo(b), cp178.alertDes = $("<strong />")
					.appendTo(c), e = $("<div />").appendTo(c), f = RedButton
					.create(LANG.tc_178_btn_ok, !0), $(f).attr("target",
					"_self").click(function() {
						tc_178saveformalert_hide()
					}).appendTo(e), cp178.alertTimeout = !1, f = $("<div />")
					.addClass("talentcalc-178cp-alert-saved").appendTo(e), g = RedButton
					.create(LANG.tc_178_btn_viewarchive, !0), $(g).attr(
					"href",
					"http://i.178.com/~talent.index.index/game/"
							+ (talentLANG == "zhCN" ? "1" : "2") + "/").attr(
					"target", "_blank").appendTo(f)
	}
	function l(b) {
		b = b || s;
		if (cp178.btnSwitch) {
			RedButton.setText(cp178.btnSwitch[0], LANG.tc_178_save);
			cp178.btnSwitch.css("display", talentData.id ? "block" : "none");
			cp178.rec.stop().css("top", "0").css("height",
					talentData.id ? 205 : 175);
			cp178.rectitle[0].className = "";
			cp178.rectitle.html(g_chr_classes[b]).addClass("c" + b);
			cp178.rectitleIcon.css("background-image",
					"url(http://db.178.com/wow/summary/server/" + b + ".gif)");
			cp178.reclinks.html("");
			if (tc_178[b])
				for (var c = 0; c < tc_178[b].length; c++) {
					var e = $("<li />").appendTo(cp178.reclinks), f = tc_178[b][c][0], g = tc_178[b][c][1];
					$("<a />").attr("href", g).attr("target", "_blank").html(f)
							.appendTo(e);
				}
			cp178.save.stop().css("top", "0").css("height", "0")
		}
	}
	function o(b, c, e) {
		for (var f = $WH.ce("table"), g = $WH.ce("tbody"), h, j, k = 0; k < c; ++k) {
			h = $WH.ce("tr");
			for (j = 0; j < b; ++j)
				if (e && k > 0) {
					j = $WH.ce("th");
					j.colSpan = 2;
					$WH.ae(h, j);
					break
				} else {
					var l = $WH.ce("td");
					l.className = "talentcalc-main-cell";
					$WH.ae(h, l)
				}
			$WH.ae(g, h)
		}
		$WH.ae(f, g);
		return f
	}
	function q(b, c, e) {
		var f = y[b.classId];
		if (b.k > 0) {
			if (b.links)
				for (k = 0; k < b.links.length; ++k)
					if (f[b.tree].t[b.links[k]].k)
						return;
			b.k--;
			for (var g = 0, h = {}, j = 0, k = 0; k < f[b.tree].t.length; ++k) {
				var l = f[b.tree].t[k];
				h[l.y] == null && (h[l.y] = 0);
				h[l.y] += l.k;
				l.k > 0 && (j = Math.max(j, l.y))
			}
			for (k = 0; k <= j; ++k) {
				if (g < k * sa) {
					b.k++;
					return
				}
				g += h[k]
			}
			f[b.tree].k--;
			f.k--;
			ma(b.tree, c, null, b.classId);
			c && (Ra(e, b), (f.k >= N - 1 || T > 0) && Q(!1), K())
		}
	}
	function v(b) {
		var c = v.L;
		if (c == null) {
			var c = v.L = {}, e;
			for (e in p.L)
				c[p.L[e]] = e
		}
		return c[b]
	}
	function p(b) {
		return p.L[b]
	}
	function r(b) {
		for (var c = 0, e = 0, f = L.length; e < f; ++e) {
			var g = L[e];
			if (b >= c && b < c + J[g].length)
				return g;
			c += J[g].length
		}
	}
	function t(b) {
		return $WH.in_array(ta[r(b)], b) == -1
	}
	function z(b) {
		var c = 0, e;
		for (e in J)
			for (var f = 0, g = J[e].length; f < g; ++f) {
				if (c == b)
					return J[e][f];
				++c
			}
		return 0
	}
	function u() {
		var b = y[s], c;
		c = B == G
				? Math.max(O ? 60 : 0, b.k > 0 ? (b.k - O) * 4 + 16 : 0)
				: b.k > 0 ? Math.max(0, 2 - b.k) + Math.min(36, b.k - 1) * 2
						+ Math.max(0, b.k - 37) + 9 : 0;
		for (var e = 0; e < ja; ++e)
			g_glyphs[b.glyphs[e]]
					&& (c = Math.max(c, z(e)), c = Math.max(c,
							g_glyphs[b.glyphs[e]].level));
		return c
	}
	function D(b, c) {
		return b.d[Math.max(0, b.k - 1) + (c ? 1 : 0)]
	}
	function Aa(b, c) {
		if (!H && !t(b))
			c ? Ea(b) && Qa(this, b) : (Ja = b, Lightbox.show("glyphpicker", {
						onShow : F
					}));
		else if (!c && this.href != "javascript:;")
			window.open(this.href);
		else
			return !1
	}
	function F(b, c) {
		Lightbox.setSize(800, 564);
		var e;
		Sa = !1;
		if (c) {
			b.className = "talentcalc-glyphpicker listview";
			var f = [], g = $WH.ce("div"), h = $WH.ce("a"), j = $WH.ce("div");
			f.push({
						none : 1
					});
			for (var k in g_glyphs)
				f.push(g_glyphs[k]);
			g.className = "listview";
			$WH.ae(b, g);
			h.className = "screenshotviewer-close";
			h.href = "javascript:;";
			h.target = "_self";
			h.onclick = Lightbox.hide;
			$WH.ae(h, $WH.ce("span"));
			$WH.ae(b, h);
			j.className = "clear";
			$WH.ae(b, j);
			e = new Listview({
						template : "glyph",
						id : "glyphs",
						parent : g,
						data : f,
						customFilter : Ha.bind(0, null),
						createNote : vb
					});
			$WH.Browser.firefox
					? $WH.aE(e.getClipDiv(), "DOMMouseScroll", g_pickerWheel)
					: e.getClipDiv().onmousewheel = g_pickerWheel
		} else
			e = g_listviews.glyphs, e.clearSearch(), e.updateFilters(!0);
		setTimeout(function() {
					e.createNote(e.noteTop, e.noteBot);
					e.focusSearch()
				}, 1)
	}
	function da(b, c) {
		if (H)
			if (c)
				return !1;
			else
				window.open(this.href);
		else
			c ? q(b, !0, this) : P(b, !0, this)
	}
	function P(b, c, e) {
		var f = y[b.classId];
		f.k < N
				? b.enabled
						&& b.k < b.m
						&& (f.k++, f[b.tree].k++, b.k++, ma(b.tree, c, b,
								b.classId), c
								&& (Ra(e, b), (f.k == N || T > 0) && Q(!1), K()))
				: B == G && f.k == N && !c && (Z(-1, fa, !0), P(b, c, e))
	}
	function Ha(b, c) {
		if (c.none)
			return !0;
		var e = y[s];
		(e = c.classs == s && c.type == r(b != null ? b : Ja)
				&& !e.glyphItems[c.id])
				&& c.level > ga && (Sa = !0);
		return e && c.level <= ga
	}
	function vb(b) {
		$(b).empty();
		Sa
				&& $(b).append('<small><b class="q10">' + LANG.tc_glyphnote
						+ "</b></small>")
	}
	function K() {
		var b = y[s];
		if (b) {
			M.mode = B;
			M.classId = s;
			M.locked = H;
			M.requiredLevel = u();
			M.pointsLeft = N - b.k;
			M.pointsSpent = B == G ? b[0].k : [b[0].k, b[1].k, b[2].k];
			M.bonusPoints = O;
			$WH.st(Ta, "(" + (B == G ? b.k : M.pointsSpent.join("/")) + ")");
			if (cp178.saveFormPoint)
				cp178.saveFormPoint[0].value = B == G ? b.k : M.pointsSpent
						.join("/");
			$WH.st(Ua, M.requiredLevel ? M.requiredLevel : "-");
			$WH.st(nb, ga);
			$WH.st(Va, M.pointsLeft);
			H
					? ($WH.st(qa, LANG.tc_unlock), qa.className = "icon-unlock")
					: ($WH.st(qa, LANG.tc_lock), qa.className = "icon-lock");
			if (ua)
				O ? ($WH.st(ua, "[-]"), ua.className = "q10") : ($WH.st(ua,
						"[+]"), ua.className = "q2");
			if (Ka)
				Ka.href = (B == G ? "/petcalc#" : "/talent#") + S.getWhBuild()
						+ (B == G ? "" : ":" + S.getWhGlyphs());
			for (var c = 0; c < E; ++c)
				$WH.st(ob[c], b[c].k);
			$(".mastery-spell-rating").removeClass("q0");
			u() < 80 && $(".mastery-spell-rating").addClass("q0");
			Wa && Wa(S, M, b)
		}
	}
	function Q(b) {
		var c = y[s];
		c.masteryTree = null;
		if (b !== !1)
			c.masteryTree = b;
		else
			for (var e = 0, b = 0; b < E; ++b)
				if (!(e > 0 && c[b].k == e) && c[b].k > e)
					e = c[b].k, c.masteryTree = b;
		for (b = 0; b < E; ++b)
			ma(b, !0, null, s);
		$(V).removeClass("locked mastery");
		$(".talent-tree-inner1, .talent-tree-inner2, .talent-tree-inner3")
				.removeClass("mastery").removeClass("locked");
		V[c.masteryTree]
				&& ($(V[c.masteryTree]).addClass("mastery"), $(
						".talent-tree-inner" + (c.masteryTree + 1), U)
						.addClass("mastery"));
		if (c.k < T)
			for (b = 0; b < E; ++b)
				b != c.masteryTree
						&& ($(V[b]).addClass("locked"), V[c.masteryTree]
								&& $(".talent-tree-inner" + (b + 1))
										.addClass("locked"));
		Da()
	}
	function Da(b) {
		var c = y[s], b = T <= 0 ? !1 : b
				? g_toggleDisplay(aa)
				: c.masteryTree == null;
		va.style.display = b ? "none" : "";
		aa.style.display = b ? "" : "none";
		RedButton.setText(ka, b ? LANG.tc_viewtalents : LANG.tc_viewsummary);
		ka.style.display = s != -1 && B != G ? "" : "none"
	}
	function cb() {
		$WH.st(na, wa[s]);
		B == G
				? na.href = "/pet=" + s
				: (na.href = class178page[s], na.onmouseover = j.bind(null,
						null, LANG.tc_178_tip_classpage.replace("$1",
								'<span class="c' + s + '">' + g_chr_classes[s]
										+ "</span>"), na), na.className = "c"
						+ s);
		if (pb == 0) {
			ha.style.display = talentData.id ? "none" : "";
			kb.style.display = "";
			if (Ka)
				Ka.style.display = "";
			if (Pa)
				Pa.style.display = "";
			if (ia)
				ia.style.display = "";
			ba.style.display = "";
			if (T > 0)
				aa.style.display = "";
			xa.style.display = ""
		} else
			Q(!1);
		for (var b = y[s], e = 0; e < E; ++e) {
			$WH.st(qb[e], b[e].n);
			$(V[e]).css("background-color", b[e].color);
			$(".role2, .role4, .role8", V[e]).remove();
			for (var f = 2; f <= b[e].role; f *= 2)
				if (b[e].role & f)
					d = $WH.ce("var", {
								className : "role" + f
							}), d.onmouseover = j.bind(null, null,
							LANG["tc_178_role" + f], d, !0), $WH.ae(V[e], d);
			Icon.setTexture(V[e].icon, 1, b[e].icon.toLowerCase())
		}
		c();
		Y(s);
		K();
		++pb
	}
	function db(b, c) {
		var e = y[c], f = 0, g = 0, h = [], j = ga;
		pa(Ca);
		Q(-1);
		c == 8 && b.length == 62 && (b = b.substr(0, 15) + b.substr(16));
		for (var k = 0; k < b.length; ++k) {
			var l = Math.min(parseInt(b.charAt(k)), e[f].t[g].m);
			if (!isNaN(l)) {
				for (var m = 0; m < l; ++m)
					P(e[f].t[g]);
				for (var o = 0; o < h.length; ++o)
					if (h[o][0].enabled && h[o][1] > 0) {
						for (m = 0; m < h[o][1]; ++m)
							P(h[o][0]);
						h[o][1] = 0
					}
				e[f].t[g].k < l && h.push([e[f].t[g], l - e[f].t[g].k]);
				if (++g > e[f].t.length - 1 && (g = 0, ++f > E - 1))
					break
			}
		}
		pa(j)
	}
	function eb(c) {
		for (var c = ("" + c).split(":"), e = {}, f = 0, g = c.length; f < g; ++f) {
			var h = c[f], j = g_glyphs[h];
			if (j) {
				var k = -1;
				e[j.type] == null && (e[j.type] = 0);
				e[j.type] < ta[j.type].length
						&& (k = ta[j.type][e[j.type]], ++e[j.type]);
				k != -1 && b(k, h, !0)
			} else
				++e[r(f)]
		}
	}
	function fb(b, c) {
		var e = y[c], f = 0, g = 0, h = [], j = [], k = ga;
		pa(Ca);
		Q(-1);
		for (var l = 0; l < b.length; ++l) {
			var m = b.charAt(l);
			if (m != ya) {
				var o = W.indexOf(m);
				if (o < 0)
					continue;
				h[1] = o % 6;
				h[0] = (o - h[1]) / 6;
				for (var s = 0; s < 2; ++s) {
					for (var o = Math.min(h[s], e[f].t[g].m), q = 0; q < o; ++q)
						P(e[f].t[g]);
					for (var p = 0; p < j.length; ++p)
						if (j[p][0].enabled && j[p][1] > 0) {
							for (q = 0; q < j[p][1]; ++q)
								P(j[p][0]);
							j[p][1] = 0
						}
					e[f].t[g].k < o && j.push([e[f].t[g], o - e[f].t[g].k]);
					if (++g >= e[f].t.length)
						break
				}
			}
			if (g >= e[f].t.length || m == ya)
				if (g = 0, ++f > E - 1)
					return
		}
		pa(k)
	}
	function gb(c) {
		for (var e = 0, f = 0, g = 0, h, j = 0, k = c.length; j < k && j < ja; ++j) {
			h != null && g >= J[h].length && (f++, g = 0);
			var l = c.charAt(j);
			h = L[f];
			l == "Z" ? (e += J[h].length - g, g = J[h].length) : (b(e,
					oa[s][h][W.indexOf(l)], !0), ++e, ++g)
		}
	}
	function Y(b) {
		Ba();
		for (var c = 0; c < E; ++c)
			ma(c, !0, null, b)
	}
	function Ba() {
		if (B == ra) {
			for (var b = 0, c = 0, e = 0, f = L.length; e < f; ++e)
				for (var g = 0, h = J[L[e]].length; g < h; ++g)
					Oa(c) && ++b, ++c;
			ia.style.display = b == 0 && H && I.profiler ? "none" : ""
		}
	}
	function hb(b, c) {
		if (y[b] == null) {
			c.n = b;
			y[b] = c;
			var e = y[b];
			e.glyphs = [];
			e.glyphItems = {};
			var f = y[b], g;
			f.k = 0;
			f.div = $WH.ce("div");
			f.div2 = $WH.ce("div");
			f.div.style.display = f.div2.style.display = "none";
			f.div.style.position = f.div2.style.position = "relative";
			$WH.aef(va, f.div);
			$WH.aef(aa, f.div2);
			for (var h = 0; h < E; ++h) {
				f[h].k = 0;
				var k = $WH.ce("div"), l = $WH.ce("div"), m;
				k.style.backgroundRepeat = "no-repeat";
				if (h > 0)
					k.style.borderLeft = "1px solid black";
				k.style.position = "absolute";
				k.style.width = B == ra ? "204px" : "244px";
				k.style.left = (B == ra ? 204 : 244) * h + (h == 2 ? 1 : 0)
						+ "px";
				m = $(k).clone().get(0);
				l.className = "talent-tree-inner" + (h + 1);
				g = o(4, Xa);
				$WH.ae(l, g);
				$WH.ae(k, l);
				$WH.ae(f.div, k);
				g = $.makeArray($(g).find("td.talentcalc-main-cell"));
				var q, l = "?" + rb;
				q = $WH.isset("g_beta") ? "beta" : $WH.isset("g_ptr")
						? "ptr"
						: $WH.isset("g_old") ? "old" : "live";
				B == G
						? (k.style.backgroundImage = "url(" + g_staticUrl
								+ "/images/wow/hunterpettalents/" + q + "/bg_"
								+ (f[0].i + 1) + ".jpg" + l + ")", q = g_staticUrl
								+ "/images/wow/hunterpettalents/"
								+ q
								+ "/icons_" + (f[0].i + 1) + ".jpg" + l)
						: (k.style.backgroundImage = "url(http://cimg.178.com/wow/images/talent/backgrounds/"
								+ g_file_classes[b] + ".jpg" + l + ")", k.style.backgroundPosition = "-"
								+ h * 204 + "px 0", q = talentPath + "/icons/"
								+ talentVER[1] + "-" + g_file_classes[b] + "_"
								+ (h + 1) + ".jpg" + l);
				for (l = f[h].t.length - 1; l >= 0; --l) {
					var p = f[h].t[l], r = Icon.create(q, 1, null,
							"javascript:;"), t = Icon.getLink(r), k = g[p.y * 4
							+ p.x + 1 - 1];
					Ya[f[h].t[l].i] = p;
					if ((typeof g_dev == "undefined" || !g_dev)
							&& k.childNodes.length)
						p.hidden = !0;
					t.rel = "np";
					t.target = "_blank";
					t.onmousedown = $WH.rf;
					t.onclick = $WH.rf;
					g_onClick(t, da.bind(t, p));
					t.onmouseover = Ra.bind(null, t, p);
					t.onmouseout = $WH.Tooltip.hide;
					var w = $WH.ce("div"), u = $WH.ce("div");
					$WH.ae(u, $WH.ct("0"));
					w.className = "icon-border"
							+ (p.t != null ? " icon-border-ability" : "");
					u.className = "icon-bubble";
					$WH.ae(r, w);
					$WH.ae(r, u);
					p.k = 0;
					p.i = l;
					p.tree = h;
					p.classId = b;
					p.icon = r;
					p.link = t;
					p.border = w;
					p.bubble = u;
					p.hidden || $WH.ae(k, r);
					if (p.r) {
						var t = f[h].t[p.r[0]], u = p.x - t.x, w = p.y - t.y, v, z, r = -1;
						t.links == null ? t.links = [l] : t.links.push(l);
						w > 0 ? r = u == 0 ? 0 : u < 0 ? 1 : 2 : w == 0
								&& (u > 0 ? r = 3 : u < 0 && (r = 4));
						B == G
								? (t = (Math.abs(u) - 1) * 60, w = (Math.abs(w) - 1)
										* 60)
								: (t = (Math.abs(u) - 1) * 50, w = (Math.abs(w) - 1)
										* 50);
						if (B == G)
							switch (r) {
								case 0 :
									w += 27, v = 21, z = 6 - w
							}
						else
							switch (r) {
								case 0 :
									w += 17;
									v = 16;
									z = 6 - w;
									break;
								case 1 :
									t += 36;
									w += 42;
									v = 16;
									z = 6 - w;
									break;
								case 2 :
									t += 37;
									w += 42;
									v = -6;
									z = 6 - w;
									break;
								case 3 :
									t += 15;
									v = -6;
									z = 12;
									break;
								case 4 :
									t += 15, v = 37, z = 12
							}
						var u = $WH.ce("div"), C = void 0, A = void 0;
						u.className = "talentcalc-arrow";
						switch (r) {
							case 0 :
								t = 15;
								C = o(1, 2);
								C.className = "talentcalc-arrow-down";
								A = C.firstChild.childNodes[0].childNodes[0].style;
								A.width = "15px";
								A.height = "4px";
								A = C.firstChild.childNodes[1].childNodes[0].style;
								A.backgroundPosition = "bottom";
								A.height = w - 4 + "px";
								break;
							case 1 :
								C = o(2, 2, !0);
								C.className = "talentcalc-arrow-leftdown";
								A = C.firstChild.childNodes[0].childNodes[0].style;
								A.backgroundPosition = "left";
								A.width = t - 4 + "px";
								A.height = "11px";
								A = C.firstChild.childNodes[0].childNodes[1].style;
								A.backgroundPosition = "right";
								A.width = "4px";
								A = C.firstChild.childNodes[1].childNodes[0].style;
								A.backgroundPosition = "bottom left";
								A.backgroundRepeat = "no-repeat";
								A.height = w - 11 + "px";
								break;
							case 2 :
								C = o(2, 2, !0);
								C.className = "talentcalc-arrow-rightdown";
								A = C.firstChild.childNodes[0].childNodes[0].style;
								A.backgroundPosition = "left";
								A.width = "4px";
								A = C.firstChild.childNodes[0].childNodes[1].style;
								A.backgroundPosition = "right";
								A.width = t - 4 + "px";
								A.height = "11px";
								A = C.firstChild.childNodes[1].childNodes[0].style;
								A.backgroundPosition = "bottom right";
								A.backgroundRepeat = "no-repeat";
								A.height = w - 11 + "px";
								break;
							case 3 :
								w = 15;
								C = o(2, 1);
								C.className = "talentcalc-arrow-right";
								A = C.firstChild.childNodes[0].childNodes[0].style;
								A.backgroundPosition = "left";
								A.width = "4px";
								A = C.firstChild.childNodes[0].childNodes[1].style;
								A.backgroundPosition = "right";
								A.width = t - 4 + "px";
								break;
							case 4 :
								w = 15, C = o(2, 1), C.className = "talentcalc-arrow-left", A = C.firstChild.childNodes[0].childNodes[0].style, A.backgroundPosition = "left", A.width = t
										- 4 + "px", A = C.firstChild.childNodes[0].childNodes[1].style, A.backgroundPosition = "right", A.width = "4px"
						}
						u.style.width = t + "px";
						u.style.height = w + "px";
						$WH.ae(u, C);
						w = u;
						w.style.left = v + "px";
						w.style.top = z + "px";
						r = $WH.ce("div");
						r.className = "talentcalc-arrow-anchor";
						$WH.ae(r, w);
						p.hidden || k.insertBefore(r, k.firstChild);
						p.arrow = w
					}
				}
				if (T > 0 && f[h].mastery) {
					m.style.borderLeft = "";
					m.style.left = 204 * h + "px";
					q = $WH.ce("div");
					p = $WH.ce("div");
					q.className = "talentcalc-masteries-tree";
					q.style.borderColor = f[h].color;
					if (h > 0)
						q.style.marginLeft = "0";
					$WH.ae(q, p);
					Za[h] = RedButton.create(f[h].n, !0);
					RedButton.setFunc(Za[h], Q.bind(null, h));
					$WH.ae(p, Za[h]);
					g = $WH.ce("div");
					g.className = "mastery-icon";
					g.style.backgroundImage = "url("
							+ icon_178db(f[h].icon.toLowerCase(), "large")
							+ ")";
					$WH.ae(g, $WH.ce("ins"));
					$WH.ae(p, g);
					bIE8
							? $WH.aef(g, $WH.ce("del"))
							: (p.className = "mastery-glow", p.style.backgroundColor = f[h].color);
					w = 0;
					for (l = 2; l <= f[h].role; l *= 2)
						if (f[h].role & l) {
							k = $WH.ce("var", {
										className : "role" + l
									});
							k.onmouseover = j.bind(null, null,
									LANG["tc_178_role" + l], k, !0);
							if ((f[h].role | l) != l)
								k.style.right = 1 - 12 * w + "px", k.style.bottom = 14
										* w - 8 + "px", w++;
							$WH.ae(g, k)
						}
					k = 176;
					if (f[h].mastery.spells) {
						l = 0;
						for (u = f[h].mastery.spells.length; l < u; ++l) {
							w = l == 0 ? 44 : 26;
							k -= w;
							g = $WH.ce("div");
							g.style.height = w + "px";
							$WH.ae(l > 0 ? q : p, g);
							if (l > 0)
								$WH.ae(g, $WH.ce("small")), g = g.firstChild;
							r = Icon.create(f[h].mastery.spells[l].icon, l == 0
											? 1
											: 0, null, link_178db("spell",
											f[h].mastery.spells[l].id));
							t = Icon.getLink(r);
							r.style.cssFloat = r.style.styleFloat = "left";
							a = $WH.ce("a");
							a.className = "mastery-spell";
							a.style.height = w + "px";
							$WH.st(a, f[h].mastery.spells[l].name);
							a.href = t.href;
							a.target = t.target = "_blank";
							w = '<b class="q1">'
									+ f[h].mastery.spells[l].name
									+ "</b><br />"
									+ (f[h].mastery.spells[l].description
											? f[h].mastery.spells[l].description
											: "\u70b9\u51fb\u67e5\u8be2");
							r.onmouseover = j.bind(null, null, w, r, !0);
							a.onmouseover = j.bind(null, null, w, a);
							$WH.ae(g, r);
							$WH.ae(g, a)
						}
					}
					if (f[h].mastery.rating) {
						p = LANG.tc_mastery;
						C = "";
						l = 0;
						for (u = f[h].mastery.rating.length; l < u; ++l)
							l > 0 && (p += " / ", C += "<br /><br />"), p += '<a href="'
									+ link_178db("spell",
											f[h].mastery.rating[l].id)
									+ '" rel="np">'
									+ f[h].mastery.rating[l].name + "</a>", C += '<b class="q1 title">'
									+ f[h].mastery.rating[l].name
									+ "</b><br />"
									+ f[h].mastery.rating[l].description;
						w = 26;
						k -= w;
						g = $WH.ce("div");
						g.style.height = w + "px";
						$WH.ae(q, g);
						$WH.ae(g, $WH.ce("small"));
						g = g.firstChild;
						g.className = "mastery-spell-rating";
						r = Icon.create("spell_holy_championsbond", 0);
						t = Icon.getLink(r);
						r.style.cssFloat = r.style.styleFloat = "left";
						a = $WH.ce("span");
						a.className = "mastery-spell q0";
						a.style.height = w + "px";
						a.innerHTML = p;
						t.onmouseover = j.bind(null, null, C, t, !0);
						a.onmouseover = j.bind(null, null, C, a);
						t.onmousemove = a.onmousemove = $WH.Tooltip.cursorUpdate;
						t.onmouseout = a.onmouseout = $WH.Tooltip.hide;
						$WH.ae(g, r);
						$WH.ae(g, a)
					}
					g = $WH.ce("div");
					g.className = "clear";
					g.style.paddingBottom = k + "px";
					$WH.ae(q, g);
					g = $WH.ce("small");
					$WH.st(g, f[h].mastery.description);
					$WH.ae(q, g);
					$WH.ae(m, q);
					$WH.ae(f.div2, m)
				}
			}
			if (X && X.classId == b) {
				for (f = 0; f < E; ++f)
					ma(f, !1, null, b);
				if (X.wh || X.blizz)
					H = talentData.id ? !0 : !1, X.wh ? fb(X.wh, b) : db(
							X.blizz, b)
			} else
				H = !1;
			X = null;
			Q(!1);
			la && la.classId == b && (la.wh ? gb(la.wh) : eb(la.blizz));
			la = null;
			if (b == s) {
				cb();
				e.div.style.display = e.div2.style.display = "";
				Da();
				for (f = 0; f < E; ++f)
					ma(f, !0, null, b)
			}
		}
	}
	function Ea(b, c) {
		var e = y[s];
		if (e.glyphs[b])
			return e.glyphItems[e.glyphs[b]] = 0, e.glyphs[b] = 0, c
					|| (Oa(b), K()), !0
	}
	function Fa(b) {
		B == G && Z(-1, 0, !0);
		Q(null);
		for (var c = 0; c < E; ++c)
			R(c, b, !1)
	}
	function Ga(b) {
		if (y[s]) {
			for (var c = 0, e = 0, f = L.length; e < f; ++e)
				for (var g = 0, h = J[L[e]].length; g < h; ++g)
					Ea(c, !b), ++c;
			Ba()
		}
	}
	function R(b, c, e) {
		var f = y[c], g;
		for (g = 0; g < f[b].t.length; ++g)
			f[b].t[g].k = 0;
		f.k -= f[b].k;
		f[b].k = 0;
		if (e) {
			f.masteryTree == b && Q(!1);
			for (b = 0; b < E; ++b)
				ma(b, !0, null, c);
			K()
		}
	}
	function ea(b, c) {
		wa[b] != null && c && (H = !0, La || (La = {
			classId : b,
			blizz : c
		}), y[b] ? (Fa(b), Y(b), db(c, b), Y(b), Q(!1)) : X = {
			classId : b,
			blizz : c
		}, Ma(b) || K())
	}
	function sb(b) {
		b && (y[s] ? (Ga(), eb(b), Ba(), K()) : la = {
			classId : s,
			blizz : b
		})
	}
	function Ma(b) {
		if (wa[b] != null && b != s) {
			$("#talentcalc-178loading").show();
			Na = s;
			s = b;
			if (B == G && y[b] == null) {
				var c = [{}], e, f;
				e = 0;
				for (f = g_pet_talents.length; e < f; ++e) {
					var g = g_pet_talents[e];
					if ($WH.in_array(g.f, b) >= 0) {
						c[0].n = g.n;
						c[0].t = [];
						c[0].i = e;
						c[0].icon = g.icon;
						for (var h = 0, j = g.t.length; h < j; ++h)
							if (e = g.t[h], f = c[0].t[h] = {}, $WH.cO(f, e), e.f
									&& $WH.in_array(e.f, b) == -1)
								f.hidden = !0;
						break
					}
				}
				hb(b, c)
			} else
				y[b]
						? (cb(), c = y[b], c.div.style.display = c.div2.style.display = "", Da(), $("#talentcalc-178loading")
								.hide())
						: $WH.g_ajaxIshRequest(talentPath + "/data/talents-"
								+ talentVER[1] + "-" + b + "-" + talentLANG
								+ ".js?" + rb);
			if (y[Na])
				y[Na].div.style.display = y[Na].div2.style.display = "none";
			l(b);
			return !0
		}
	}
	function pa(b) {
		b = parseInt(b);
		if (!isNaN(b) && !(b < ib || b > Ca))
			ga = b, Z(
					B == G ? Math.max(0, Math.floor((b - 16) / 4)) : Math.max(
							0, Math.min(10, b) - 9)
							+ Math
									.max(0, Math.floor((Math.min(80, b) - 9)
													/ 2)) + Math.max(0, b - 80),
					-1, !0), $a(b), Ba()
	}
	function Z(b, e, f) {
		var g = N;
		b == -1 && (b = za);
		e == -1 && (e = O);
		za = b;
		O = e;
		N = b + e;
		s != -1 && (N < g && c(), Y(s), f || K())
	}
	function $a(b) {
		ja = 0;
		ta = {};
		for (var c = 0, e = 0, f = L.length; e < f; ++e) {
			var g = L[e];
			ta[g] = [];
			for (var h = 0, j = J[g].length; h < j; ++h)
				b >= J[g][h] && (ta[g].push(c), ja++), ++c
		}
	}
	function ab(b) {
		if (b) {
			var c = b, e = !1, f;
			if (B == G) {
				var g = W.indexOf(b.charAt(0));
				if (g >= 0 && g <= 5) {
					var h = W.indexOf(b.charAt(1));
					h % 2 == 1 ? (Z(-1, fa, !0), --h) : Z(-1, 0, !0);
					f = g * 10 + h / 2;
					g_pet_families[f] != null && (b = b.substr(2), e = !0)
				}
			} else
				g = W.indexOf(b.charAt(0)), g >= 0
						&& g <= 28
						&& (h = g % 3, f = (g - h) / 3, h == 1
								? Z(-1, fa, !0)
								: Z(-1, 0, !0), f = v(f), f != null
								&& (b = b.substr(1), e = !0));
			if (e)
				return b.length && (H = !0, La || (La = {
					wh : c
				})), y[f] ? (Fa(f), fb(b, f), Y(f), Q(!1)) : X = {
					classId : f,
					wh : b
				}, Ma(f) || K(), f
		}
	}
	function bb(b) {
		b && (tb || (tb = {
			wh : b
		}), y[s] ? (Ga(), gb(b), Ba(), K()) : la = {
			classId : s,
			wh : b
		})
	}
	function Qa(b, c, e) {
		var f = jQuery(b), g = "", h = "", j = g_glyphs[y[s].glyphs[c]], k = t(c);
		j && !k
				? (g += "<b>" + j.name + "</b>", g += '<br /><span class="q9">'
						+ LANG["tc_glyph" + r(c)] + "</span>", h += '<span class="q">'
						+ j.description + "</span>", H
						|| (h += '<br /><span class="q10">' + LANG.tc_remgly
								+ "</span>"))
				: k
						? (g += '<b class="q0">' + LANG.tc_locked + "</b>", g += '<br /><span class="q9">'
								+ LANG["tc_glyph" + r(c)] + "</span>", h += '<span class="q10">'
								+ $WH.sprintf(LANG.tc_lockgly, z(c))
								+ "</span>")
						: (g += '<b class="q0">' + LANG.tc_empty + "</b>", g += '<br /><span class="q9">'
								+ LANG["tc_glyph" + r(c)] + "</span>", H
								|| (h += '<span class="q2">' + LANG.tc_addgly
										+ "</span>"));
		j && b.parentNode.className.indexOf("icon") != 0 ? $WH.Tooltip
				.setIcon(j.icon) : $WH.Tooltip.setIcon(null);
		_tip.show($WH.Tooltip.getMultiPartHtml(g, h), f, e === !0 ? {
					pos : "bottomright"
				} : null)
	}
	function Ra(b, c) {
		var e = jQuery(b), f = y[c.classId], g = "<table><tr><td><b>";
		c.z
				&& (g += '<span style="float: right" class="q0">' + c.z
						+ "</span>");
		g += c.n + "</b><br />" + $WH.sprintf(LANG.tc_rank, c.k, c.m)
				+ "<br />";
		c.r
				&& f[c.tree].t[c.r[0]].k < c.r[1]
				&& (g += '<span class="q10">', g += $WH.sprintf(
						LANG[c.r[1] == 1 ? "tc_prereq" : "tc_prereqpl"],
						c.r[1], f[c.tree].t[c.r[0]].n), g += "</span><br />");
		f[c.tree].k < c.y * sa
				&& (g += '<span class="q10">'
						+ $WH.sprintf(LANG.tc_tier, c.y * sa, f[c.tree].n)
						+ "</span><br />");
		c.t && c.t.length >= 1 && (g += c.t[0]);
		g += "</td></tr></table><table><tr><td>";
		c.t && c.t.length > 1 && (g += c.t[1] + "<br />");
		g += '<span class="q">' + D(c) + "</span><br />";
		!H
				&& c.enabled
				&& (c.k ? c.k == c.m
						&& (g += '<span class="q10">' + LANG.tc_unlearn
								+ "</span><br />") : g += '<span class="q2">'
						+ LANG.tc_learn + "</span><br />", c.k
						&& c.k < c.m
						&& (g += "<br />" + LANG.tc_nextrank
								+ '<br /><span class="q">' + D(c, 1)
								+ "</span><br />"));
		g += "</td></tr></table>";
		_tip.show($WH.g_setTooltipLevel(g, u()), e, {
					pos : "topright"
				})
	}
	function ub(b) {
		if (Locale.getId() == LOCALE_ENUS)
			return b.replace(/^Glyph of(the)?/i, "");
		if (Locale.getId() == LOCALE_ZHCN)
			return b.replace(/^(.+)\u96d5\u6587?/i, "$1");
		if (Locale.getId() == LOCALE_ZHTW)
			return b.replace(/^(.+)\u96d5\u7d0b?/i, "$1");
		return b
	}
	function jb() {
		H = !H;
		Y(s);
		K();
		return H
	}
	function Oa(b) {
		var c = y[s], e = lb[b], f = Icon.getLink(e), g = t(b), h = mb[b], j;
		c.glyphs[b]
				&& (j = g_glyphs[c.glyphs[b]], (g || j.level > ga) && Ea(b));
		return j && !g
				? (Icon.setTexture(e, 0, j.icon), h.href = f.href = link_178db(
						"item", j.id), $WH.st(h, ub(j.name)), h.className = "q1", !0)
				: (Icon.setTexture(e, 0, "inventoryslot_empty"), h.href = f.href = "javascript:;", h.target = "_self", f.target = "_self", $WH
						.st(h, !g ? LANG.tc_empty : LANG.tc_locked), h.className = "q0", !1)
	}
	function ma(b, c, e, f) {
		var g = y[f], h = T > 0
				&& (g.masteryTree === null || g[g.masteryTree]
						&& g[g.masteryTree].k < T);
		if (h && b != g.masteryTree && g[b].k > 0)
			return R(b, f, !0);
		for (f = 0; f < g[b].t.length; ++f)
			if (e = g[b].t[f], e.enabled = h && b != g.masteryTree
					? 0
					: g.k == N && !e.k ? 0 : g[b].k >= e.y * sa ? e.r
							? g[b].t[e.r[0]].k >= e.r[1] ? 1 : 0
							: 1 : 0, c) {
				if (e.enabled && (!H || e.k)) {
					if (e.k == e.m
							? (e.border.style.backgroundPosition = "-42px 0", e.bubble.style.color = "#E7BA00")
							: (e.border.style.backgroundPosition = "-84px 0", e.bubble.style.color = "#17FD17"), Icon
							.moveTexture(e.icon, 1, f, 0), e.link.className = "bubbly", e.bubble.style.visibility = "visible", e.r) {
						var j = e.arrow.firstChild;
						j.className.charAt(j.className.length - 1) != "2"
								&& (j.className += "2")
					}
				} else if (e.border.style.backgroundPosition = "0 0", Icon
						.moveTexture(e.icon, 1, f, 1), e.link.className = "", e.bubble.style.visibility = "hidden", e.r
						&& (j = e.arrow.firstChild, j.className
								.charAt(j.className.length - 1) == "2"))
					j.className = j.className.substr(0, j.className.length - 1);
				e.bubble.firstChild.nodeValue = e.k;
				e.link.href = link_178db("spell", e.s[Math.max(0, e.k - 1)])
			}
	}
	var ra = 0, G = 1, ib = 10, Ca = 85, rb = 87, S = this, I, y = {}, oa = {}, Ya = {}, X, La, tb, la, s = -1, Na = -1, pb = 0, Ja, Sa = !1, H = !1, B, E, Xa, ja, ta, L = [
			3, 1, 2], J = {
		1 : [],
		2 : [],
		3 : []
	}, sa, za, wa, T, O = 0, fa, N, ga = 85, U, Ia, ha, qa, kb, Ka, Pa, ia, lb = {}, mb = {}, ca, ba, na, Ta, Ua, nb, Va, ua, aa, ka, Za = [], xa, V = [], qb = [], ob = [], va, W = "0zMcmVokRsaqbdrfwihuGINALpTjnyxtgevElBCDFHJKOPQSUWXYZ123456789", ya = "Z", Wa, M = {};
	this.getTalentTrees = function() {
		return y[s]
	};
	this.addGlyph = function(c) {
		c ? b(Ja, c) : Ea(Ja);
		Lightbox.hide()
	};
	this.getBlizzBuild = function() {
		if (s != -1) {
			for (var b = y[s], c = "", e = 0; e < E; ++e)
				for (var f = 0; f < b[e].t.length; ++f)
					c += b[e].t[f].k;
			return c = $WH.rtrim(c, "0")
		}
	};
	this.getBlizzGlyphs = function() {
		if (s != -1) {
			for (var b = y[s], c = "", e = 0; e < ja; ++e)
				e > 0 && (c += ":"), c += b.glyphs[e] ? b.glyphs[e] : "0";
			return c
		}
	};
	this.getGlyphs = function() {
		var b = [];
		if (s != -1) {
			var c = y[s];
			if (c)
				for (var e = 0; e < ja; ++e)
					c.glyphs[e] && b.push(g_glyphs[c.glyphs[e]])
		}
		return b
	};
	this.getSpentFromBlizzBuild = function(b, c) {
		var e = y[c], f = [0, 0, 0];
		if (e) {
			var g = 0, h = 0;
			c == 8 && b.length == 62 && (b = b.substr(0, 15) + b.substr(16));
			for (var j = 0; j < b.length; ++j) {
				var k = Math.min(parseInt(b.charAt(j)), e[g].t[h].m);
				if (!isNaN(k)) {
					for (var l = 0; l < k; ++l)
						++f[g];
					if (++h > e[g].t.length - 1 && (h = 0, ++g > E - 1))
						break
				}
			}
		}
		return f
	};
	this.getTalents = function() {
		var b = [];
		if (s != -1) {
			var c = y[s];
			if (c)
				for (var e = 0; e < E; ++e)
					for (i = 0; i < c[e].t.length; ++i)
						c[e].t[i].k && b.push(c[e].t[i])
		}
		return b
	};
	this.getTalentRanks = function(b) {
		if (s != -1) {
			if (Ya[b])
				return Ya[b].k;
			return 0
		}
	};
	this.getWhBuild = function() {
		if (s != -1) {
			for (var b = y[s], c = "", e, f, g = 0; g < E; ++g) {
				e = "";
				for (f = 0; f < b[g].t.length; ++f)
					e += b[g].t[f].k;
				f = e = $WH.rtrim(e, "0");
				for (var h = "", j = [], k = 0; k < f.length; k += 2) {
					for (var l = 0; l < 2; ++l)
						j[l] = parseInt(f.substring(k + l, k + l + 1)), isNaN(j[l])
								&& (j[l] = 0);
					h += W.charAt(j[0] * 6 + j[1])
				}
				c += h;
				f = e.length;
				f % 2 == 1 && ++f;
				f < b[g].t.length && (c += ya)
			}
			b = B == G ? W.charAt(Math.floor(s / 10))
					+ W.charAt(2 * (s % 10) + (O ? 1 : 0)) : W.charAt(p(s) * 3
					+ (O ? 1 : 0));
			b += $WH.rtrim(c, ya);
			return b
		}
	};
	this.getWhGlyphs = function() {
		if (s != -1) {
			for (var b = y[s], c = {}, e = 0; e < ja; ++e) {
				var f = r(e);
				c[f] == null && (c[f] = "");
				b.glyphs[e] && (c[f] += W.charAt(g_glyphs[b.glyphs[e]].index))
			}
			for (var b = "", g = e = 0, h = L.length; g < h; ++g)
				f = L[g], e += J[f].length, c[f] && (b += c[f]), b.length < e
						&& (b += ya);
			return b = $WH.rtrim(b, ya)
		}
	};
	this.getInGamePreview = function() {
		if (s != -1) {
			for (var b = y[s], c = [], e = {}, f = 0; f < E; ++f) {
				e[f] = [f + 1];
				for (var g = 0; g < b[f].t.length; ++g) {
					var h = b[f].t[g].k;
					h > 0 && e[f].push((g + 1) * 10 + h)
				}
				f == b.masteryTree ? c.splice(0, 0, f) : c.push(f)
			}
			b = "/run t,p,a={";
			for (g = 0; g < c.length; ++g)
				b += e[c[g]].join(",") + ",";
			b += "}SetPreviewPrimaryTalentTree(t[1],GetActiveTalentGroup())for i=1,#t do a=t[i]if a<9 then p=a else AddPreviewTalentPoints(p,floor(a/10),a%10)end end";
			_178func.copyToClipboard(b, !0, LANG.prompt_ingamepreview)
		}
	};
	this.initialize = function(b, c) {
		if (!U && (b = $WH.ge(b))) {
			U = b;
			U.className = "talentcalc";
			c == null && (c = {});
			I = c;
			if (I.onChange)
				Wa = I.onChange;
			if (I.mode == G)
				B = G, E = 1, Xa = 6, sa = 3, za = 17, T = 0, fa = 4, wa = g_pet_families, U.className += " talentcalc-pet", $a(0);
			else {
				B = ra;
				E = 3;
				Xa = 7;
				J = {
					1 : [25, 50, 75],
					2 : [25, 50, 75],
					3 : [25, 50, 75]
				};
				sa = 5;
				za = 36;
				T = 31;
				fa = 5;
				wa = g_chr_classes;
				za = 41;
				fa = 0;
				U.className += " talentcalc-default";
				$WowheadTalentCalculator = S;
				$a($WH.isset("g_beta") ? Ca : 85);
				var j, l, p, o = [], q;
				for (q in g_glyphs)
					o.push(q);
				o.sort();
				for (var r = 0, s = o.length; r < s; ++r) {
					q = o[r];
					j = g_glyphs[q];
					l = j.classs;
					p = j.type;
					if (!oa[l]) {
						oa[l] = {};
						for (var t in J)
							oa[l][t] = []
					}
					if (oa[l][p])
						j.id = q, j.index = oa[l][p].length, oa[l][p]
								.push(j.id)
				}
			}
			N = za + O;
			ca = $WH.ce("div");
			ca.className = "talentcalc-wrapper";
			$WH.ae(U, ca);
			k();
			m();
			$("<div />").addClass("talentcalc-178loading").attr("id",
					"talentcalc-178loading")
					.append("<strong>Loading...</strong>").appendTo($(U));
			ba = $WH.ce("div");
			ba.className = "talentcalc-upper";
			ba.style.display = "none";
			j = $WH.ce("span");
			j.className = "talentcalc-upper-class";
			na = a = $WH.ce("a");
			a.target = "_blank";
			$WH.ae(j, a);
			$WH.ae(j, $WH.ct(" "));
			Ta = $WH.ce("b");
			$WH.ae(j, Ta);
			$WH.ae(ba, j);
			j = $WH.ce("span");
			j.className = "talentcalc-upper-ptsleft";
			$WH.ae(j, $WH.ct(LANG.tc_ptsleft));
			Va = $WH.ce("b");
			$WH.ae(j, Va);
			$WH.ae(ba, j);
			if (B == G)
				l = ua = $WH.ce("a"), l.href = "javascript:;", l.target = "_self", l.onclick = e
						.bind(null, l), l.onmouseover = f.bind(null, l), l.onmousemove = $WH.Tooltip.cursorUpdate, l.onmouseout = $WH.Tooltip.hide, $WH
						.ae(j, l);
			j = $WH.ce("span");
			j.className = "talentcalc-upper-reqlevel";
			$WH.ae(j, $WH.ct(LANG.tc_reqlevel));
			Ua = $WH.ce("b");
			$WH.ae(j, Ua);
			l = nb = $WH.ce("a");
			l.className = "q1";
			l.href = "javascript:;";
			l.target = "_self";
			l.onclick = g.bind(null, l);
			l.onmouseover = h.bind(null, l);
			l.onmousemove = $WH.Tooltip.cursorUpdate;
			l.onmouseout = $WH.Tooltip.hide;
			!I.profiler
					&& !talentData.id
					&& ($WH.ae(j, $WH.ct(" (")), $WH.ae(j, l), $WH.ae(j, $WH
									.ct(")")));
			$WH.ae(ba, j);
			j = $WH.ce("div");
			j.className = "clear";
			$WH.ae(ba, j);
			$WH.ae(ca, ba);
			xa = $WH.ce("div");
			xa.className = "talentcalc-treenames";
			xa.style.display = "none";
			for (p = 0; p < E; ++p) {
				j = $WH.ce("div");
				j.className = "talentcalc-treenames-tree" + (p + 1);
				V[p] = l = $WH.ce("p");
				l.icon = Icon.create(null, 1);
				l.className = "locked";
				$WH.ae(l, l.icon);
				o = $WH.ce("span");
				q = $WH.ce("b");
				qb[p] = o;
				ob[p] = q;
				$WH.ae(o, q);
				$WH.ae(l, o);
				o = $WH.ce("a");
				o.href = "javascript:;";
				o.target = "_self";
				o.onclick = S.reset.bind(null, p);
				if (talentData.id)
					o.style.display = "none", $(l).css({
								width : 197,
								"padding-right" : 5
							});
				g_addTooltip(o, LANG.tc_resettree);
				$WH.ae(l, o);
				o = $WH.ce("em");
				$WH.ae(l, o);
				$WH.ae(j, l);
				$WH.ae(xa, j)
			}
			$WH.ae(ca, xa);
			aa = $WH.ce("div");
			aa.className = "talentcalc-masteries";
			aa.style.display = "none";
			j = $WH.ce("div");
			j.className = "clear";
			$WH.ae(aa, j);
			$WH.ae(ca, aa);
			va = $WH.ce("div");
			va.className = "talentcalc-main";
			j = $WH.ce("div");
			j.className = "clear";
			$WH.ae(va, j);
			$WH.ae(ca, va);
			j = $("<div />").attr("id", "global-share").appendTo($(ca));
			_page.shareblock(j, {
						hasLeft : !1
					});
			ka = RedButton.create(LANG.tc_viewtalents, !0);
			if (T <= 0)
				ka.style.display = "none";
			ka.style.marginTop = "3px";
			ka.style.display = "none";
			RedButton.setFunc(ka, Da.bind(null, 1));
			$WH.ae(ca, ka);
			I.whBuild ? ab(I.whBuild) : I.classId > 0
					&& wa[I.classId]
					&& (I.blizzBuild
							? ea(I.classId, I.blizzBuild)
							: Ma(I.classId));
			I.whGlyphs ? bb(I.whGlyphs) : I.blizzGlyphs && sb(I.blizzGlyphs)
		}
	};
	this.promptBlizzBuild = function() {
		if (B != G) {
			var b, c = prompt(LANG.prompt_importblizz, "");
			if (c)
				if (c.match(/\?cid=([0-9]+)&tal=([0-9]+)/))
					b = parseInt(RegExp.$1), ea(b, RegExp.$2);
				else {
					var e = c.indexOf("?tal=");
					if (e != -1) {
						for (var f in g_file_classes)
							if (c.indexOf(g_file_classes[f]) != -1) {
								b = parseInt(f);
								break
							}
						if (b) {
							ea(b, c.substring(e + 5));
							return
						}
					}
					alert(LANG.alert_invalidurl)
				}
		}
	};
	this.promptWhBuild = function() {
		var b = prompt(LANG.prompt_importwh, "");
		if (b) {
			var c = b.indexOf("#");
			if (c != -1)
				if (b = b.substr(c), b.indexOf("-") != -1) {
					var c = b.substr(1).split("-"), b = c[0] || "", c = c[1]
							|| "", e = -1, f;
					for (f in g_file_classes)
						if (g_file_classes[f] == b) {
							e = f;
							break
						}
					e != -1 && ea(e, c)
				} else
					c = b.substr(1).split(":"), f = c[1] || "", ab(c[0] || ""), bb(f)
		}
	};
	this.registerClass = function(b, c) {
		hb(b, c);
		$("#talentcalc-178loading").hide()
	};
	this.reset = function(b) {
		if (s != -1 && !(b > E - 1))
			return H = !1, R(b, s, !0), !1
	};
	this.resetAll = function() {
		if (y[s]) {
			H = !1;
			var b = s;
			Fa(b);
			Ga();
			Y(b);
			K();
			return !1
		}
	};
	this.resetBuild = function() {
		y[s] && (H = !1, Fa(s), Y(s), K())
	};
	this.resetGlyphs = function() {
		Ga();
		K();
		return !1
	};
	this.setBlizzBuild = function(b, c) {
		ea(b, c)
	};
	this.setBlizzGlyphs = function(b) {
		s != -1 && sb(b)
	};
	this.setBonusPoints = function() {
		Z(-1, fa)
	};
	this.getBonusPoints = function() {
		return O
	};
	this.setClass = function(b) {
		return Ma(b)
	};
	this.setLevelCap = function(b) {
		pa(b)
	};
	this.setLock = function(b) {
		s != -1 && H != b && (H = b, Y(s), K())
	};
	this.setWhBuild = function(b) {
		return ab(b)
	};
	this.setWhGlyphs = function(b) {
		s != -1 && bb(b)
	};
	this.showSummary = function(b) {
		if (s != -1) {
			var c = y[s], e, f, g = "<html><head><title>"
					+ document.title
					+ '</title></head><body style="font-family: Arial, sans-serif; font-size: 13px">';
			if (b) {
				g += "<h2>";
				g += B == G ? $WH.sprintf(LANG.tc_printh, u(),
						g_pet_families[c.n]) : $WH.sprintf(LANG.tc_printh, u(),
						g_chr_classes[c.n])
						+ " (" + c[0].k + "/" + c[1].k + "/" + c[2].k + ")";
				g += "</h2>";
				g += "<p></p>";
				for (b = 0; b < E; ++b) {
					g += "<h3>" + c[b].n + " (" + c[b].k + " "
							+ LANG[c[b].k == 1 ? "tc_point" : "tc_points"]
							+ ")</h3>";
					g += "<blockquote>";
					for (e = f = 0; e < c[b].t.length; ++e)
						c[b].t[e].k
								&& (f && (g += "<br /><br />"), g += "<b>"
										+ c[b].t[e].n
										+ "</b>"
										+ LANG.hyphen
										+ $WH.sprintf(LANG.tc_rank,
												c[b].t[e].k, c[b].t[e].m)
										+ "<br />", g += D(c[b].t[e]), ++f);
					f == 0 && (g += LANG.tc_none);
					g += "</blockquote>"
				}
				g += "<h3>" + LANG.tc_glyphs + "</h3>";
				g += "<blockquote>";
				for (b = glyphCount = 0; b < ja; ++b)
					if (glyph = g_glyphs[c.glyphs[b]])
						glyphCount && (g += "<br /><br />"), g += "<b>"
								+ glyph.name + "</b> ", g += "("
								+ LANG["tc_glyph" + glyph.type] + ")<br />", g += glyph.description, glyphCount++;
				glyphCount == 0 && (g += LANG.tc_none);
				g += "</blockquote>"
			} else {
				g += "<pre>";
				for (b = 0; b < E; ++b) {
					g += "<b>" + c[b].n + " (" + c[b].k + " "
							+ LANG[c[b].k == 1 ? "tc_point" : "tc_points"]
							+ ")</b>\n\n";
					for (e = f = 0; e < c[b].t.length; ++e)
						c[b].t[e].k
								&& (g += "&nbsp;&nbsp;&nbsp;&nbsp;"
										+ c[b].t[e].k + "/" + c[b].t[e].m + " "
										+ c[b].t[e].n + "\n", ++f);
					f == 0
							&& (g += "&nbsp;&nbsp;&nbsp;&nbsp;" + LANG.tc_none
									+ "\n");
					g += "\n"
				}
				g += "</pre>"
			}
			g += "</body></html>";
			talentSummary = g;
			window
					.open("summary/", "",
							"toolbar=no,menubar=yes,status=yes,scrollbars=yes,resizable=yes")
		}
	};
	this.simplifyGlyphName = function(b) {
		return ub(b)
	};
	this.toggleLock = function() {
		if (s != -1)
			return jb(), !1
	};
	this.reset178cp = function(b) {
		l(b)
	};
	this.switch178cp = function() {
		cp178.selfSwitching = !0;
		var b = cp178.rec, c = cp178.save;
		cp178.selfCur == "talented"
				? (b = cp178.save, c = cp178.rec, cp178.selfCur = "untalented", RedButton
						.setText(cp178.btnSwitch[0], talentData.id
										? LANG.tc_178_btn_viewsave
										: LANG.tc_178_save))
				: (cp178.selfCur = "talented", RedButton.setText(
						cp178.btnSwitch[0], LANG.tc_178_btn_viewrec));
		b.stop().css("top", "0").css("height", talentData.id ? 205 : 175);
		c.stop().css("top", "0").css("height", "0");
		b.animate({
					top : talentData.id ? 205 : 175,
					height : 0
				}, 400);
		c.animate({
					height : talentData.id ? 205 : 175
				}, 400)
	};
	p.L = {
		6 : 9,
		11 : 0,
		3 : 1,
		8 : 2,
		2 : 3,
		5 : 4,
		4 : 5,
		7 : 6,
		9 : 7,
		1 : 8
	}
}
TalentCalc.MODE_DEFAULT = 0;
TalentCalc.MODE_PET = 1;
Listview.templates.glyph = {
	sort : [1],
	nItemsPerPage : -1,
	hideBands : 2,
	hideNav : 3,
	hideHeader : 1,
	searchable : 1,
	searchDelay : 100,
	poundable : 0,
	filtrable : 0,
	clip : {
		w : 780,
		h : 486
	},
	onBeforeCreate : function() {
		this.applySort()
	},
	onSearchSubmit : function(b) {
		this.nRowsVisible == 1 && $WowheadTalentCalculator.addGlyph(b.id)
	},
	columns : [{
		id : "glyph",
		type : "text",
		align : "left",
		value : "name",
		span : 2,
		compute : function(b, c, e) {
			if (!b.none) {
				var f = $WH.ce("td");
				f.style.width = "1px";
				f.style.padding = "0";
				f.style.borderRight = "none";
				var g = Icon.create(b.icon, 0, null, link_178db("item", b.id)), h = Icon
						.getLink(g);
				$WH.ae(f, g);
				$WH.ae(e, f);
				c.style.borderLeft = "none";
				h.onclick = $WH.rf;
				var j = $WH.ce("a");
				j.style.fontFamily = "Verdana, sans-serif";
				j.href = link_178db("item", b.id);
				$WH.ae(j, $WH.ct($WowheadTalentCalculator
								.simplifyGlyphName(b.name)));
				c.style.whiteSpace = "nowrap";
				$WH.ae(c, j);
				$(e).click(function(c) {
					if (c.which != 2 || c.target != j)
						c.preventDefault(), $WowheadTalentCalculator.addGlyph
								.bind(null, b.id)()
				})
			}
		},
		sortFunc : function(b, c) {
			if (b.none)
				return -1;
			return $WH.strcmp(b.name, c.name)
		}
	}, {
		id : "description",
		type : "text",
		align : "left",
		value : "description",
		compute : function(b, c) {
			if (!b.none) {
				var e = $WH.ce("div");
				e.className = "small";
				$WH.ae(e, $WH.ct(b.description));
				$WH.ae(c, e)
			}
		}
	}, {
		id : "level",
		type : "text",
		align : "center",
		value : "level",
		compute : function(b, c) {
			if (!b.none)
				return c.className = "small q0", c.style.whiteSpace = "nowrap", LANG.tc_level
						.replace("%s", b.level)
		}
	}, {
		id : "skill",
		type : "text",
		align : "center",
		getValue : function(b) {
			if (!b.none)
				return g_spell_skills[b.skill]
		},
		compute : function(b, c, e) {
			if (b.none)
				return $WH.ee(e), $(e).click($WowheadTalentCalculator.addGlyph
						.bind(null, 0)), c.colSpan = 5, c.style.fontWeight = "bold", c.style.textAlign = "center", LANG.dash
						+ LANG.tc_nonegly + LANG.dash;
			if (b.skill)
				return c.className = "small q0", c.style.whiteSpace = "nowrap", g_spell_skills[b.skill]
		}
	}]
};
var talentSummary;
function tc_linktarget() {
	$("#tc-classes a").each(function() {
				if (this.href == "javascript:;")
					this.target = "_self"
			})
}
function tc_init() {
	$WH.isset("$WowheadPower") && $WowheadPower.loadScales(6);
	var b;
	$("#tc-classes").addClass = "choose";
	var c = g_sortJsonArray(g_chr_classes, g_chr_classes);
	b = $("#tc-classes-inner")[0];
	for (var e = 0, f = c.length; e < f; ++e) {
		var g = c[e], h = Icon.create("class_" + g_file_classes[g], 1, null,
				"javascript:;"), j = Icon.getLink(h);
		tc_classIcons[g] = h;
		j.onclick = tc_classClick.bind(j, g);
		j.onmouseover = tc_classOver.bind(j, g);
		j.onmouseout = _tip.hide;
		$WH.ae(b, h)
	}
	c = $WH.ce("div");
	c.className = "clear";
	$WH.ae(b, c);
	tc_object = new TalentCalc;
	tc_object.initialize("tc-itself", {
				onChange : tc_onChange
			});
	if (talentData.id && !talentData.initted)
		location.hash = talentData.talent, talentData.initted = !0;
	tc_readPound();
	PoundChecker.start(tc_readPound);
	_178func.uriHash()
			|| $("#tc-classes-inner a").eq(_178func
					.randNumber($("#tc-classes-inner a").length)
					- 1).click();
	talentLoaded.initted = !0;
	bIE6
			&& ($("#tc-classes")
					.prepend('<div class="tc-ie6warning">\u60a8\u6b63\u5728\u4f7f\u7528\u7684\u6d4f\u89c8\u5668\uff08\u6216\u6d4f\u89c8\u5668\u5185\u6838\uff09\u662fIE6\uff0c\u8fd9\u6b3e\u6d4f\u89c8\u5668\u5df2\u8fc7\u65f6\uff0c\u8be5\u6d4f\u89c8\u5668\u5bf9\u672c\u5929\u8d4b\u6a21\u62df\u5668\u7684\u652f\u6301\u6b20\u4f73<br />\u60a8\u53ef\u4ee5\u9009\u62e9\u5347\u7ea7\u60a8\u7684IE\u5230\u6700\u65b0\u7248\u672c\uff0c\u6216\u4f7f\u7528\u5176\u4ed6\u6838\u5fc3\u7684\u6d4f\u89c8\u5668\uff08\u5982\u706b\u72d0\u3001\u8c37\u6b4c\u6d4f\u89c8\u5668\uff09\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u591a\u6838\u5fc3\u6d4f\u89c8\u5668\uff08\u5982\u50b2\u6e383\u6d4f\u89c8\u5668\u3001360\u6781\u901f\u6d4f\u89c8\u5668\uff09<br /><span>\u70b9\u51fb\u4e0b\u8f7d <a href="http://windows.microsoft.com/zh-CN/internet-explorer/products/ie/home" target="_blank">IE\u6d4f\u89c8\u5668\u6700\u65b0\u7248</a> | <a href="http://www.firefox.com/" target="_blank">\u706b\u72d0\u6d4f\u89c8\u5668</a> | <a href="http://chrome.google.com/" target="_blank">\u8c37\u6b4c\u6d4f\u89c8\u5668</a> | <a href="http://www.maxthon.cn/" target="_blank">\u50b2\u6e38\u6d4f\u89c8\u5668</a> | <a href="http://chrome.360.cn/" target="_blank">360\u6781\u901f\u6d4f\u89c8\u5668</a></span></div>'), $("#tc-classes")
					.addClass("tc-ie6"))
}
function tc_classClick(b) {
	tc_object.setClass(b) && _tip.hide();
	talentData.id
			&& (_ele.alert('<div class="tc-178alert" id="tc-178alert"></div>'), setTimeout(
					function() {
						var b = $("#tc-178alert"), e;
						e = $("<h2 />").html(LANG.tc_178_warning_out)
								.appendTo(b);
						e = $("<p />").appendTo(b);
						$("<a />").attr({
							href : location.href.replace(
									/([\&\?]*)id\=([0-9]+)([\&]*)/, ""),
							target : "_blank"
						}).html(LANG.tc_178_btn_ok).click(function() {
							_ele.loadimg("fun-close");
							$("#global-imgloader .global-imgloader-close").css(
									"display", "block")
						}).appendTo(e);
						$("#global-imgloader .global-imgloader-close").css(
								"display", "none");
						setTimeout(function() {
									location.hash = talentData.talent
								}, 100)
					}, 100));
	return !1
}
function tc_classOver(b) {
	_tip.show("<span class='c" + b + "'>" + g_chr_classes[b] + "</span>", this,
			!0)
}
function tc_onChange(b, c, e) {
	var f;
	if (c.classId != tc_classId) {
		tc_loaded
				|| (f = $("#tc-classes")[0], $WH.de($WH.gE(f, "p")[0]), $(f)
						.removeClass("choose"), tc_loaded = !0);
		if (tc_classId != -1)
			f = tc_classIcons[tc_classId], f.className = tc_classIcons[tc_classId].className
					.replace("iconmedium-gold-selected", "");
		tc_classId = c.classId;
		f = tc_classIcons[tc_classId];
		f.className += " iconmedium-gold-selected";
		PageTemplate.set({
					breadcrumb : [1, 0, tc_classId]
				})
	}
	tc_build = b.getWhBuild();
	tc_glyphs = b.getWhGlyphs();
	b = "#" + tc_build;
	tc_glyphs != "" && (b += ":" + tc_glyphs);
	if (b.length > 2) {
		if (cp178.btnSwitch && cp178.btnSwitch.css("display") == "none"
				|| talentData.id)
			cp178.btnSwitch.css("display", "block"), cp178.selfCur = "untalented", tc_object
					.switch178cp()
	} else
		cp178.btnSwitch && cp178.btnSwitch.css("display") == "block"
				&& tc_object.reset178cp();
	_178.acc
			|| ($("#talentcalc-178cp-btn-login").attr(
					"href",
					"http://i.178.com/~index.index.login?to="
							+ encodeURIComponent(location.href)), $("#talentcalc-178cp-btn-reg")
					.attr(
							"href",
							"http://account.178.com/?p=register&to"
									+ encodeURIComponent(location.href)));
	location.replace(b);
	b = document.title;
	b.indexOf("/") != -1
			&& (c = b.indexOf("- "), c != -1 && (b = b.substring(c + 2)));
	document.title = g_chr_classes[tc_classId] + " (" + e[0].k + "/" + e[1].k
			+ "/" + e[2].k + ") - " + b;
	tc_linktarget()
}
function tc_readPound() {
	if (location.hash.indexOf("-") != -1) {
		var b = location.hash.substr(1).split("-"), c = b[0] || "", b = b[1]
				|| "", e = -1, f;
		for (f in g_file_classes)
			if (g_file_classes[f] == c) {
				e = f;
				break
			}
		e != -1 && tc_object.setBlizzBuild(e, b)
	} else
		b = location.hash.substr(1).split("."), c = !1, b.length == 2
				&& (c = !0), b = b[0].split(":"), f = b[0] || "", b = b[1]
				|| "", !tc_object.getBonusPoints() && c
				&& tc_object.setBonusPoints(), tc_build != f
				&& (tc_build = f, tc_object.setWhBuild(tc_build)), tc_glyphs != b
				&& (tc_glyphs = b, tc_object.setWhGlyphs(tc_glyphs))
}
function tc_checkLoad() {
	if (talentLoaded.initted)
		return !1;
	talentLoaded.local && talentLoaded.glyph && talentLoaded.recs
			&& talentLoaded.data
			&& (tc_init(), talentData.id && tc_178getCommentId())
}
function tc_178saveformshowicon(b, c) {
	Lightbox.setSize(800, 564);
	aF = !1;
	if (c) {
		b.className = "talentcalc-glyphpicker talentcalc-iconpicker listview";
		var e = $WH.ce("div"), f = $WH.ce("a"), g = $WH.ce("div");
		e.className = "listview";
		b.id = "talentcalc-iconpicker";
		$WH.ae(b, e);
		if (bIE7) {
			var e = $("<div />").addClass("listview-clip scrolled").css({
						width : 780,
						height : 506,
						overflow : "hidden"
					}).appendTo($(b)), h = $("<div />")
					.addClass("scrolled-scroll").appendTo(e), h = $("<div />")
					.addClass("track").appendTo(h), h = $("<div />")
					.addClass("thumb").appendTo(h);
			$("<div />").addClass("end").appendTo(h);
			e = $("<div />").addClass("scrolled-viewpoint").css({
						width : 770,
						height : 506
					}).appendTo(e);
			e = $("<div />").addClass("scrolled-content").appendTo(e)
		} else
			e = $("<div />").addClass("listview-clip").css({
						width : 770,
						height : 496
					}).appendTo($(b));
		for (h = 1; h < 306; h++) {
			h < 100 && (h = h < 10 ? "00" + h : "0" + h);
			var j = bIE7 ? Icon.create(
					"http://cimg.178.com/wow/images/talent/icons178/medium/ambush"
							+ h + ".jpg", 1, null, "javascript:;") : Icon
					.create("http://i.178.com/res/talent/images/tf-icon/ambush"
									+ h + ".jpg", 2, null, "javascript:;"), j = $(j);
			j.click(function() {
				var b = /ambush([0-9]+)\.jpg/
						.exec(this.firstChild.style.backgroundImage), b = b[1];
				cp178.saveFormIconSel.firstChild.style.backgroundImage = "url(http://cimg.178.com/wow/images/talent/icons178/medium/ambush"
						+ b + ".jpg)";
				cp178.saveFormIcon[0].value = "ambush" + b;
				Lightbox.hide()
			}).appendTo(e)
		}
		f.className = "screenshotviewer-close";
		f.href = "javascript:;";
		f.target = "_self";
		f.onclick = Lightbox.hide;
		$WH.ae(f, $WH.ce("span"));
		$WH.ae(b, f);
		g.className = "clear";
		$WH.ae(b, g);
		_page.scrollblock($("#talentcalc-iconpicker"))
	}
	setTimeout(function() {
				_page.scrollblock($("#talentcalc-iconpicker"))
			}, 1)
}
function tc_178saveformcheck() {
	if (cp178.saveFormSubmitting)
		return !1;
	cp178.saveFormTalent[0].value = location.hash;
	if (location.hash.length < 3)
		return tc_178saveformalert("\u8bf7\u914d\u7f6e\u6b63\u786e\u7684\u5929\u8d4b"), !1;
	if (!cp178.saveFormTitle[0].value || !cp178.saveFormTitle[0].value.length)
		return tc_178saveformalert("\u8bf7\u586b\u5199\u5929\u8d4b\u914d\u7f6e\u540d\u79f0"), !1;
	if (cp178.saveFormTitle[0].value.length > 14)
		return tc_178saveformalert("\u5929\u8d4b\u914d\u7f6e\u540d\u79f0\u4e0d\u5f97\u8d85\u8fc714\u4e2a\u5b57"), !1;
	if (!cp178.saveFormIcon[0].value)
		return tc_178saveformalert("\u8bf7\u9009\u62e9\u5929\u8d4b\u914d\u7f6e\u56fe\u6807"), !1;
	if (cp178.saveFormDes[0].value.length > 100)
		return tc_178saveformalert("\u5929\u8d4b\u914d\u7f6e\u4ecb\u7ecd\u4e0d\u5f97\u8d85\u8fc7100\u4e2a\u5b57"), !1;
	cp178.saveFormSubmitting = !0;
	RedButton.enable(cp178.saveFormBtn, !1);
	return !0
}
function tc_178saveformalert(b, c) {
	clearTimeout(cp178.alertTimeout);
	cp178.alert.removeClass("saved");
	cp178.alertTimeout = !1;
	cp178.alertDes.text(b);
	c ? cp178.alert.addClass("saved") : cp178.alertTimeout = setTimeout(
			tc_178saveformalert_hide, 3E3);
	cp178.alert.fadeIn(200);
	return !1
}
function tc_178saveformalert_hide() {
	clearTimeout(cp178.alertTimeout);
	cp178.alertTimeout = !1;
	cp178.alert.fadeOut(400)
}
function tc_178thumb(b) {
	if (cp178.voted)
		return !1;
	_178func.counter("http://i.178.com/~talent.index.voteTalent?tid="
			+ talentData.id + "&act=" + b);
	_tip.hide();
	cp178.voteUpTip = cp178.voteDownTip = LANG.tc_178_tip_voted;
	cp178.voteNum.html(cp178.vote + (b == "1" ? 1 : -1));
	cp178.voted = !0
}
function tc_178getCommentId() {
	_178func.counter("http://i.178.com/~talent.index.getCommentdata?tid="
			+ talentData.id)
}
function getCommentContentData(b) {
	var c = $("<div />").addClass("talentcalc-178comment")
			.appendTo($("#tc-body-178"));
	$("<h2 />").html(LANG.tc_178_comments).appendTo(c);
	$("<iframe />").attr({
		allowtransparency : !0,
		name : "comments_area",
		id : "comments_area",
		scrolling : "no",
		frameborder : "no",
		height : "411",
		src : "http://comments.178.com/resorces_comments.php?resources_id=" + b
				+ "&css=http://cimg.178.com/sc2/s/style-comments.css"
	}).appendTo(c)
}
function showdata(b) {
	jQuery.extend(talentData, b);
	talentLoaded.data = !0;
	tc_checkLoad()
}
function submitmessage(b) {
	b == 1 && tc_178saveformalert(LANG.tc_178_save_saved2, !0);
	b == 3 && tc_178saveformalert(LANG.tc_178_save_saved, !0);
	cp178.saveFormSubmitting = !1;
	RedButton.enable(cp178.saveFormBtn, !0)
}
var talentLoaded = {
	initted : !1,
	local : !1,
	glyph : !1,
	recs : !1,
	data : _178func.uriSearch("id") ? !1 : !0
}, talentData = {
	initted : !1,
	warning_once : !1
}, tfdata;
$("document").ready(function() {
	document.domain = "178.com";
	if ($("#summary").length)
		try {
			$WH.ge("summary").innerHTML = window.opener.talentSummary
		} catch (b) {
		}
	else {
		_178func.counter("about:blank");
		talentLANG = _178func.uriSearch("lang") || talentLANG;
		talentVER[1] = _178func.uriSearch("version") || talentVER[1];
		var c = !1, e = !1;
		$("#tc-tabs a").each(function(b) {
			var f = this.href.substr(this.href.indexOf("lang=") + 5), g = $(this)
					.find("em").html(), h = g.split(".");
			h[1] && (h[1] = "0" + h[1]);
			h[2] && (h[2] = "0" + h[2]);
			h = h[0] + "" + h[1] + "" + h[2];
			this.href += "&version=" + h;
			_178func.uriSearch("lang") == f
					? _178func.uriSearch("version") == h
							? (c = !0, $(this).addClass("cur"), talentLANG = f, talentVER = [
									g, h])
							: e = [f, [g, h], this]
					: b == 0 && (e = [f, [g, h], this])
		});
		if (!c)
			if (_178func.uriSearch("version")) {
				var f = _178func.uriSearch("lang"), g = _178func
						.uriSearch("version"), h = parseInt(g.substr(0, 1))
						+ "." + parseInt(g.substr(1, 2)) + "."
						+ parseInt(g.substr(3, 2));
				$("#tc-tabs").append('<a href="?lang='
						+ _178func.uriSearch("lang")
						+ '" target="_self" class="cur"><span>' + langname(f)
						+ "<em>" + (g == 99999 ? "TEST" : g)
						+ "</em></span></a>");
				talentLANG = f;
				talentVER = [h, g]
			} else
				talentLANG = e[0], talentVER = e[1], $(e[2]).addClass("cur");
		jQuery.getScript(talentPath + "s/script-talent-local-" + talentLANG
						+ ".js", function() {
					talentLoaded.local = !0;
					Locale.set(eval("LOCALE_" + talentLANG.toUpperCase()));
					tc_checkLoad()
				});
		jQuery.getScript(talentPath + "/data/glyph-" + talentVER[1] + "-"
						+ talentLANG + ".js", function() {
					talentLoaded.glyph = !0;
					tc_checkLoad()
				});
		switch (talentLANG) {
			case "zhCN" :
				jQuery.getScript(talentPath + "s/share_CN.js", function() {
							talentLoaded.recs = !0;
							tc_checkLoad()
						});
				break;
			case "zhTW" :
				jQuery.getScript(talentPath+"s/share_TW.js",
						function() {
							talentLoaded.recs = !0;
							tc_checkLoad()
						});
				break;
			case "enUS" :
				jQuery.getScript("http://i.178.com/res/talent/tw/link178.js",
						function() {
							talentLoaded.recs = !0;
							tc_checkLoad()
						})
		}
		talentLoaded.data
				|| _178func
						.counter("http://i.178.com/~talent.index.getTfDataWow?tid="
								+ _178func.uriSearch("id"));
		$("#tc-body-178").addClass("tc-local-" + talentLANG)
	}
});
$WH.g_convertScalingSpell.SV = {
	1 : [23.3107, 34.6214, 5.2216, 37.2971, 22.555, 23.3107, 30.0793, 31.0214,
			32.2214, 0, 25.7771, 3],
	2 : [24.1651, 35.4356, 5.7727, 38.6641, 22.8271, 24.1651, 30.7255, 31.4306,
			32.7267, 0, 26.4755, 3],
	3 : [24.7346, 35.5984, 6.277, 39.5754, 22.8815, 24.7346, 30.8547, 31.5124,
			32.8278, 0, 26.6152, 4],
	4 : [25.1143, 35.8589, 6.7472, 40.1829, 22.9686, 25.1143, 31.0615, 31.6433,
			32.9895, 0, 26.8387, 4],
	5 : [25.3675, 36.038, 7.1928, 40.588, 23.0284, 25.3675, 31.2037, 31.7334,
			33.1006, 0, 26.9923, 5],
	6 : [25.8738, 36.2139, 7.7215, 41.398, 23.0872, 25.8738, 31.3433, 31.8217,
			33.2098, 0, 27.1432, 5],
	7 : [27.1553, 36.3562, 8.5082, 43.4485, 23.1348, 27.1553, 31.4562, 31.8933,
			33.2981, 0, 27.2653, 6],
	8 : [28.4368, 36.4902, 9.333, 45.4989, 23.1796, 28.4368, 31.5626, 31.9606,
			33.3813, 0, 27.3802, 7],
	9 : [29.7184, 37.8794, 10.196, 47.5494, 23.5733, 29.7184, 32.6485, 32.5713,
			34.1745, 0, 28.5971, 7],
	10 : [30.9999, 38.6922, 11.0972, 49.5998, 23.9155, 30.9999, 33.3104,
			33.0673, 34.7479, 0, 29.2692, 8],
	11 : [32.2814, 39.413, 12.0365, 51.6503, 24.209, 32.2814, 33.8949, 33.4947,
			35.2466, 0, 29.8687, 8],
	12 : [33.563, 40.0417, 13.0139, 53.7007, 24.4536, 33.563, 34.4021, 33.8535,
			35.6706, 0, 30.3957, 9],
	13 : [34.8445, 40.5784, 14.0295, 55.7512, 24.6495, 34.8445, 34.832,
			34.1437, 36.0198, 0, 30.8502, 9],
	14 : [37.1915, 42.3805, 15.5282, 59.5064, 25.7049, 37.1915, 36.3846,
			35.6445, 37.5977, 0, 32.1517, 10],
	15 : [39.6652, 44.1849, 17.1514, 63.4644, 26.7761, 39.6652, 37.9444,
			37.1693, 39.1938, 0, 33.4634, 11],
	16 : [42.2657, 45.9759, 18.9051, 67.6252, 27.8523, 42.2657, 39.4977,
			38.7032, 40.7928, 0, 34.773, 11],
	17 : [44.993, 47.738, 20.7947, 71.9888, 28.923, 44.993, 41.0304, 40.231,
			42.3796, 0, 36.0683, 12],
	18 : [47.847, 49.4556, 22.826, 76.5552, 29.9776, 47.847, 42.5288, 41.7376,
			43.939, 0, 37.3369, 12],
	19 : [50.8277, 51.1132, 25.0047, 81.3244, 31.0057, 50.8277, 43.9789,
			43.208, 45.4558, 0, 38.5667, 13],
	20 : [53.9353, 52.6953, 27.3363, 86.2964, 31.9966, 53.9353, 45.367,
			44.6273, 46.9148, 0, 39.7455, 14],
	21 : [58.8846, 54.4846, 29.7556, 90.3279, 33.6486, 58.8846, 46.6013,
			46.8581, 48.8949, 0, 41.294, 14],
	22 : [64.1624, 56.2322, 32.3265, 94.4277, 35.3325, 64.1624, 47.7707,
			49.1244, 50.8768, 0, 42.8351, 15],
	23 : [69.78, 57.9299, 35.0535, 98.5882, 37.0434, 69.78, 48.8674, 51.4189,
			52.8527, 0, 44.3625, 15],
	24 : [75.7488, 59.5701, 37.9411, 102.802, 38.7764, 75.7488, 49.8842,
			53.7345, 54.8151, 0, 45.8701, 16],
	25 : [82.0803, 61.1453, 40.9935, 107.061, 40.5265, 82.0803, 50.8144,
			56.064, 56.7566, 0, 47.3519, 17],
	26 : [88.7858, 62.6485, 44.215, 111.358, 42.2887, 88.7858, 51.6517,
			58.4003, 58.67, 0, 48.8023, 17],
	27 : [95.8768, 64.0733, 47.6099, 115.686, 44.0578, 95.8768, 52.3907,
			60.7361, 60.5484, 0, 50.2157, 18],
	28 : [103.365, 65.4135, 51.1823, 120.036, 45.8288, 103.365, 53.0262,
			63.0644, 62.3851, 0, 51.5869, 18],
	29 : [111.261, 66.6632, 54.9364, 124.402, 47.5965, 111.261, 53.5537,
			65.378, 64.1734, 0, 52.9107, 19],
	30 : [119.577, 67.8171, 58.8762, 128.775, 49.3556, 119.577, 53.9691,
			67.6698, 65.907, 0, 54.1822, 20],
	31 : [128.323, 70.2758, 63.0058, 133.148, 52.144, 128.323, 55.3766,
			71.3599, 68.9589, 0, 56.5272, 20],
	32 : [137.513, 72.7271, 67.3291, 137.513, 55.0287, 137.513, 56.7193,
			75.1661, 72.0684, 0, 58.9058, 21],
	33 : [147.156, 75.1662, 71.8499, 141.863, 58.0102, 147.156, 57.9908,
			79.0884, 75.233, 0, 61.3156, 21],
	34 : [157.265, 77.5882, 76.5723, 146.19, 61.0891, 157.265, 59.1841,
			83.1267, 78.4502, 0, 63.7541, 22],
	35 : [167.85, 79.9881, 81.4999, 150.486, 64.2659, 167.85, 60.2929, 87.2807,
			81.7176, 0, 66.2189, 23],
	36 : [178.923, 82.3611, 86.6366, 154.745, 67.5409, 178.923, 61.3102,
			91.5504, 85.0327, 0, 68.7075, 23],
	37 : [190.496, 84.7021, 91.9859, 158.957, 70.9147, 190.496, 62.2297,
			95.9356, 88.393, 0, 71.2174, 24],
	38 : [202.58, 87.0064, 97.5516, 163.117, 74.3878, 202.58, 63.0445, 100.436,
			91.7962, 0, 73.7463, 24],
	39 : [215.187, 89.2691, 103.337, 167.215, 77.9607, 215.187, 63.7481,
			105.052, 95.2397, 0, 76.2916, 25],
	40 : [228.327, 91.4851, 109.346, 171.245, 81.6337, 228.327, 64.3338,
			109.783, 98.7212, 0, 78.851, 26],
	41 : [237.558, 94.5168, 116.451, 182.128, 84.8264, 235.578, 66.6823, 113.1,
			101.446, 0, 81.422, 26],
	42 : [246.991, 97.5646, 123.889, 193.477, 88.0704, 242.875, 69.059, 116.4,
			104.135, 0, 84.0022, 27],
	43 : [256.628, 100.626, 131.668, 205.302, 91.3642, 250.212, 71.4627,
			119.677, 106.785, 0, 86.5891, 27],
	44 : [266.467, 103.699, 139.798, 217.615, 94.7066, 257.585, 73.892,
			122.928, 109.391, 0, 89.1804, 28],
	45 : [276.51, 106.78, 148.289, 230.425, 98.0965, 264.988, 76.3458, 126.146,
			111.947, 0, 91.7735, 28],
	46 : [286.755, 109.868, 157.15, 243.742, 101.533, 272.417, 78.8229,
			129.329, 114.45, 0, 94.3661, 29],
	47 : [297.203, 112.959, 166.392, 257.576, 105.013, 279.866, 81.3219,
			132.47, 116.894, 0, 96.9557, 30],
	48 : [307.853, 116.052, 176.025, 271.937, 108.538, 287.33, 83.8416,
			135.565, 119.274, 0, 99.5399, 30],
	49 : [318.707, 119.144, 186.057, 286.836, 112.105, 294.804, 86.3809,
			138.61, 121.587, 0, 102.116, 31],
	50 : [329.763, 122.232, 196.501, 302.283, 115.713, 302.283, 88.9384,
			141.599, 123.827, 0, 104.683, 31],
	51 : [341.022, 125.314, 207.366, 318.287, 119.361, 309.762, 91.5129,
			144.529, 125.989, 0, 107.236, 32],
	52 : [352.484, 128.387, 218.662, 334.86, 123.047, 317.236, 94.1033,
			147.394, 128.069, 0, 109.775, 33],
	53 : [364.149, 131.45, 230.4, 352.01, 126.771, 324.699, 96.7081, 150.189,
			130.062, 0, 112.296, 33],
	54 : [376.016, 134.499, 242.591, 369.749, 130.531, 332.148, 99.3263,
			152.911, 131.964, 0, 114.797, 34],
	55 : [388.086, 137.532, 255.245, 388.086, 134.326, 339.576, 101.957,
			155.554, 133.769, 0, 117.276, 34],
	56 : [400.36, 140.547, 268.373, 407.032, 138.154, 346.978, 104.598,
			158.114, 135.473, 0, 119.73, 35],
	57 : [412.835, 143.541, 281.986, 426.597, 142.015, 354.35, 107.248,
			160.585, 137.072, 0, 122.157, 36],
	58 : [425.514, 293.024, 296.095, 446.79, 291.813, 361.687, 219.815,
			325.929, 277.12, 0, 249.109, 36],
	59 : [478.257, 327.008, 338.963, 510.141, 328.421, 402.533, 246.45,
			362.339, 306.629, 0, 277.898, 37],
	60 : [491.95, 332.962, 355.055, 532.946, 336.625, 409.958, 251.971,
			366.621, 308.962, 0, 282.633, 37],
	61 : [512.169, 354.075, 376.742, 552.215, 355.277, 432.076, 274.168,
			384.399, 328.7, 0, 303.65, 54],
	62 : [532.943, 375.985, 399.409, 571.938, 374.585, 454.951, 297.331,
			402.743, 349.192, 0, 325.525, 55],
	63 : [554.279, 398.707, 423.086, 592.122, 394.558, 478.595, 321.476,
			421.66, 370.449, 0, 348.274, 56],
	64 : [576.187, 422.256, 447.802, 612.77, 415.208, 503.02, 346.622, 441.159,
			392.487, 0, 371.914, 57],
	65 : [598.672, 446.646, 473.588, 633.888, 436.546, 528.24, 372.788,
			461.248, 415.318, 0, 396.46, 59],
	66 : [621.743, 471.89, 500.474, 655.481, 458.581, 554.267, 399.993,
			481.937, 438.956, 0, 421.927, 60],
	67 : [645.407, 498.002, 528.491, 677.554, 481.326, 581.114, 428.254,
			503.232, 463.412, 0, 448.333, 61],
	68 : [669.673, 524.997, 557.67, 700.112, 504.79, 608.793, 457.591, 525.144,
			488.702, 0, 475.691, 63],
	69 : [694.546, 552.889, 588.043, 723.161, 528.985, 637.318, 488.021,
			547.679, 514.837, 0, 504.019, 68],
	70 : [720.036, 581.691, 619.643, 746.704, 553.92, 666.7, 519.562, 570.847,
			541.831, 0, 533.332, 70],
	71 : [746.15, 611.418, 652.502, 770.748, 579.607, 696.953, 552.234,
			594.656, 569.697, 0, 563.645, 89],
	72 : [772.895, 642.083, 686.653, 795.297, 606.055, 728.089, 586.053,
			619.113, 598.448, 0, 594.974, 93],
	73 : [800.278, 673.701, 722.129, 820.357, 633.277, 760.121, 621.039,
			644.228, 628.097, 0, 627.334, 96],
	74 : [828.309, 706.285, 758.966, 845.932, 661.281, 793.062, 657.21,
			670.008, 658.656, 0, 660.742, 100],
	75 : [856.993, 739.849, 797.196, 872.028, 690.078, 826.923, 694.583,
			696.462, 690.139, 0, 695.212, 104],
	76 : [886.339, 774.407, 836.855, 898.65, 719.679, 861.719, 733.177,
			723.597, 722.558, 0, 730.76, 107],
	77 : [916.355, 809.974, 877.979, 925.802, 750.095, 897.461, 773.01,
			751.422, 755.927, 0, 767.402, 112],
	78 : [947.048, 846.562, 920.602, 953.49, 781.334, 934.163, 814.099,
			779.945, 790.257, 0, 805.152, 116],
	79 : [978.425, 884.185, 964.762, 981.719, 813.409, 971.836, 856.463,
			809.174, 825.563, 0, 844.027, 120],
	80 : [1010.49, 922.858, 1010.49, 1010.49, 846.328, 1010.49, 900.12,
			839.117, 861.855, 0, 884.04, 125],
	81 : [1032.93, 943.72, 1032.93, 1032.93, 865.675, 1032.93, 920.54, 858.338,
			881.517, 0, 904.113, 305],
	82 : [1055.63, 964.814, 1055.63, 1055.63, 885.235, 1055.63, 941.187,
			877.77, 901.397, 0, 924.408, 338],
	83 : [1078.57, 986.142, 1078.57, 1078.57, 905.007, 1078.57, 962.061,
			897.413, 921.494, 0, 944.926, 375],
	84 : [1101.77, 1007.7, 1101.77, 1101.77, 924.992, 1101.77, 983.161,
			917.266, 941.807, 0, 965.665, 407],
	85 : [1125.23, 1029.49, 1125.23, 1125.23, 945.189, 1125.23, 1004.49,
			937.33, 962.336, 0, 986.626, 443]
};
$WH.g_convertScalingSpell.SD = {
	1 : [1500, 3500, 20, 8, 1.004, 0.035, 0, 0.242, 0, 0, 0, 0, 0, 0.45, 20],
	2 : [1500, 3E3, 20, 8, 0, 1, 0, 0, 0.077, 0, 0, 0, 0, 1, 0],
	8 : [0, 0, 20, 8, 1.25, 0, 0, 0.2, 0, 0, 0, 0, 0, 0.83, 80],
	9 : [2350, 2350, 20, 8, 2.035, 0, 0, 0.15, 0, 0, 0, 0, 0, 0.485, 80],
	10 : [0, 0, 20, 8, 0.283, 0, 0, 0.08, 0, 0, 0, 0, 0, 1, 0],
	12 : [0, 0, 20, 8, 0.382, 0, 0, 0, 0, 0, 0, 0, 0, 1, 80],
	13 : [0, 0, 20, 8, 0.989, 0, 0, 0.164, 0, 0, 0, 0, 0, 1, 0],
	14 : [0, 0, 20, 8, 0.319, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	15 : [0, 0, 20, 8, 0, 0.84, 0, 0, 0.09, 0, 0, 0, 0, 1, 0],
	16 : [0, 0, 20, 8, 1.378, 0, 0, 0.15, 0, 0, 0, 0, 0, 1, 0],
	17 : [0, 0, 20, 8, 1.113, 0, 0, 0.17, 0, 0, 0, 0, 0, 1, 0],
	18 : [1500, 2500, 20, 8, 1.091, 0, 0, 0.242, 0, 0, 0, 0, 0, 0.88, 80],
	19 : [2E3, 2E3, 20, 8, 0.662, 0.103, 0, 0.202, 0, 0, 0, 0, 0, 1, 0],
	20 : [0, 0, 20, 8, 0.424, 0, 0, 0.15, 0, 0, 0, 0, 0, 1, 0],
	21 : [1500, 2E3, 20, 8, 0, 0.804, 0, 0, 0.242, 0, 0, 0, 0, 0.88, 80],
	22 : [1500, 2500, 20, 8, 0, 0.949, 0.007, 0, 0.242, 0, 0, 0, 0, 0.8, 80],
	23 : [0, 0, 20, 8, 0.432, 0, 0, 0.242, 0, 0, 0, 0, 0, 0.8, 80],
	24 : [0, 0, 20, 8, 0.43, 0, 0, 0, 0, 0, 0, 0, 0, 0.88, 80],
	25 : [0, 0, 20, 8, 0.43, 0, 0, 0, 0, 0, 0, 0, 0, 0.88, 80],
	26 : [2100, 3500, 20, 8, 1.575, 0.235, 0, 0.238, 0, 0, 0, 0, 0, 0.88, 80],
	27 : [1500, 1500, 20, 8, 0.781, 0, 0, 0.17, 0, 0, 0, 0, 0, 1, 0],
	34 : [0, 0, 20, 8, 2.324, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	36 : [0, 0, 20, 8, 3.933, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	37 : [0, 0, 20, 8, 1.585, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	38 : [0, 0, 20, 8, 0.203, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	39 : [0, 0, 20, 8, 0, 0, 0.048, 0, 0, 0, 0, 0, 0, 1, 0],
	41 : [0, 0, 20, 8, 0.048, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	42 : [0, 0, 20, 11, 0.72, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	45 : [1700, 1700, 20, 11, 0, 0.038, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	46 : [1500, 1500, 20, 11, 0, 0.038, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	49 : [0, 0, 20, 11, 0.474, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	50 : [0, 0, 20, 11, 0.095, 0.221, 0, 0, 0.2, 0, 0, 0, 0, 1, 0],
	51 : [1500, 3E3, 20, 11, 7.97, 0, 0, 0.166, 0, 0, 0, 0, 0, 1, 0],
	52 : [0, 0, 20, 11, 0.327, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	53 : [0, 0, 20, 11, 0.138, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	54 : [0, 0, 20, 11, 0.016, 0.2, 1.917, 0, 0, 0, 0, 0, 0, 1, 0],
	55 : [0, 0, 20, 11, 0.231, 2.337, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	56 : [0, 0, 20, 11, 0.32, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	57 : [0, 0, 20, 11, 0.294, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	58 : [0, 0, 20, 11, 0.396, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	59 : [0, 0, 20, 11, 0.277, 0.565, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	60 : [0, 0, 20, 11, 0.335, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	61 : [1500, 1500, 20, 11, 3.628, 0.366, 0, 0.11, 0, 0, 0, 0, 0, 1, 0],
	62 : [0, 0, 20, 11, 1.325, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	63 : [0, 0, 20, 11, 0.335, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	64 : [0, 0, 20, 11, 0.404, 0, 0, 0.15, 0, 0, 0, 0, 0, 1, 0],
	66 : [3500, 3200, 20, 11, 1.124, 0, 0, 0.22, 0, 0, 0, 0, 0, 1, 0],
	67 : [0, 0, 20, 11, 0.145, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	68 : [0, 0, 20, 11, 0.181, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	69 : [0, 0, 20, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	70 : [0, 0, 20, 11, 3.935, 0.348, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	71 : [0, 0, 20, 11, 0, 1.316, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	72 : [0, 0, 20, 11, 0.539, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	73 : [1500, 2500, 20, 11, 0.728, 0, 0, 0.12, 0, 0, 0, 0, 0, 1, 0],
	75 : [0, 0, 20, 3, 0.258, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	76 : [2400, 2400, 0, 3, 0.73, 0, 0, 0.11, 0, 0, 0, 0, 0, 1, 0],
	78 : [0, 0, 20, 12, 1.44, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	80 : [0, 0, 20, 3, 0.362, 0.667, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	81 : [0, 0, 20, 3, 0.285, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	82 : [0, 0, 20, 3, 0.314, 0, 0, 0.187, 0, 0, 0, 0, 0, 1, 0],
	83 : [0, 0, 20, 3, 0.198, 0.026, 0, 0.25, 0, 0, 0, 0, 0, 1, 0],
	84 : [0, 0, 20, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	85 : [0, 0, 20, 3, 0.512, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	86 : [0, 0, 1, 4, 0.251, 0, 0, 1, 0, 0, 0.366, 0, 0, 1, 0],
	87 : [0, 0, 20, 3, 0.483, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	88 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	91 : [0, 0, 20, 3, 0.332, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	92 : [0, 0, 20, 3, 0.409, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	93 : [1500, 1500, 20, 3, 0.249, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	95 : [0, 0, 20, 3, 0.811, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	96 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	97 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	98 : [0, 0, 20, 3, 0.142, 0, 0, 0.35, 0, 0, 0, 0, 0, 1, 0],
	99 : [0, 0, 20, 3, 0.142, 0, 0, 0.35, 0, 0, 0, 0, 0, 1, 0],
	100 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	101 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	102 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	103 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	104 : [0, 0, 20, 3, 1.221, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	105 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	106 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	107 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	108 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	109 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	110 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	111 : [0, 0, 20, 3, 0.056, 0.022, 0, 0.352, 0.292, 0, 0, 0, 0, 1, 0],
	112 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	113 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	114 : [0, 0, 20, 3, 0, 0.023, 0, 0, 0.3, 0, 0, 0, 0, 1, 0],
	115 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	116 : [0, 0, 20, 3, 0.142, 0, 0, 0.35, 0, 0, 0, 0, 0, 1, 0],
	117 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	118 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	119 : [0, 0, 20, 3, 0.056, 0.056, 0, 0.3, 0.3, 0, 0, 0, 0, 1, 0],
	120 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	121 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	122 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	123 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	124 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	125 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	126 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	127 : [0, 0, 20, 11, 0.058, 0, 0, 0, 0, 0, 0.163, 0, 0, 1, 0],
	128 : [0, 0, 20, 11, 0.333, 0, 0, 0.74, 0, 0, 0.508, 0, 0, 0.439, 80],
	130 : [0, 0, 20, 11, 0.075, 0, 0, 0, 0, 0, 0.179, 0, 0, 1, 0],
	131 : [0, 0, 20, 12, 1.24, 1.24, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	133 : [0, 0, 20, 12, 1.32, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	135 : [0, 0, 20, 1, 0, 0.299, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	139 : [0, 0, 20, 1, 0, 0.376, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	140 : [0, 0, 20, 1, 0.075, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	141 : [0, 0, 20, 1, 1.598, 0, 0, 0.2, 0, 0, 0, 0, 0, 1, 0],
	142 : [0, 0, 20, 1, 0, 1.706, 0, 0, 0.05, 0, 0, 0, 0, 0.3, 80],
	143 : [1500, 1500, 20, 1, 0.383, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	144 : [0, 0, 20, 1, 0.269, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	145 : [0, 0, 20, 6, 0.317, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	146 : [0, 0, 20, 6, 0.756, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	147 : [0, 0, 20, 6, 0.378, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	149 : [0, 0, 20, 6, 0.041, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	150 : [0, 0, 20, 6, 0.876, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	151 : [0, 0, 20, 6, 0.294, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	152 : [0, 0, 20, 6, 0.147, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	153 : [0, 0, 20, 6, 0.247, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	154 : [0, 0, 20, 6, 0.124, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	155 : [0, 0, 20, 6, 0.728, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	156 : [0, 0, 20, 12, 1.24, 1.24, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	157 : [0, 0, 20, 6, 0, 1.068, 0, 0, 0.083, 0, 0, 0, 0, 1, 0],
	158 : [0, 0, 20, 6, 0.468, 0, 0, 0.083, 0, 0, 0, 0, 0, 1, 0],
	159 : [0, 0, 20, 6, 0.578, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	160 : [0, 0, 20, 6, 0.289, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	161 : [0, 0, 20, 6, 0.374, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	162 : [0, 0, 20, 6, 0.187, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	163 : [0, 0, 20, 6, 0.555, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	164 : [0, 0, 20, 2, 3.024, 0, 0, 0.2, 0, 0, 0, 0, 0, 0.33, 80],
	168 : [0, 0, 20, 12, 9.2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	169 : [1500, 1500, 20, 2, 2.663, 0.179, 0, 0.11, 0, 0, 0, 0, 0, 1, 0],
	170 : [0, 0, 20, 12, 1.04, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	171 : [1500, 1500, 20, 2, 7.119, 0, 0, 0.115, 0, 0, 0, 0, 0, 1, 0],
	175 : [0, 0, 20, 2, 3.9, 0, 0, 0.1, 0, 0, 0, 0, 0, 1, 0],
	176 : [1500, 3E3, 20, 2, 4.274, 0, 0, 0.108, 0, 0, 0, 0, 0, 1, 0],
	177 : [0, 0, 20, 2, 0, 0.095, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	178 : [0, 0, 20, 2, 2.66, 0, 0, 0.08, 0, 0, 0, 0, 0, 1, 0],
	179 : [0, 0, 20, 2, 1.416, 0, 0, 0.08, 0, 0, 0, 0, 0, 1, 0],
	180 : [0, 0, 20, 2, 2.366, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	181 : [0, 0, 20, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	182 : [0, 0, 20, 2, 0.118, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	184 : [0, 0, 20, 2, 0.593, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	185 : [1500, 1500, 20, 5, 5.746, 5.746, 0, 0.25, 0.25, 0, 0, 0, 0, 1, 0],
	186 : [0, 0, 20, 5, 2.571, 0, 0, 0.1, 0, 0, 0, 0, 0, 1, 0],
	187 : [0, 0, 20, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	188 : [0, 0, 20, 5, 0.164, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	189 : [1500, 1500, 20, 5, 7.174, 0, 0, 0.15, 0, 0, 0, 0, 0, 1, 0],
	190 : [1500, 3E3, 20, 5, 3.587, 0, 0, 0.15, 0, 0, 0, 0, 0, 1, 0],
	191 : [2E3, 2E3, 20, 5, 1.083, 0.054, 0, 0.238, 0, 0, 0, 0, 0, 1, 0],
	192 : [0, 0, 20, 5, 0.316, 0, 0, 0.15, 0, 0, 0, 0, 0, 1, 0],
	193 : [0, 0, 20, 5, 1.94, 0, 0, 0.15, 0, 0, 0, 0, 0, 1, 0],
	194 : [0, 0, 20, 12, 0, 1.2, 1.2, 0, 0, 0, 0, 0, 0, 1, 0],
	195 : [0, 0, 20, 5, 3.045, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	196 : [1500, 1500, 20, 5, 1.39, 0, 0, 0.055, 0, 0, 0, 0, 0, 1, 0],
	197 : [0, 0, 20, 5, 0.177, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	198 : [0, 0, 20, 5, 0.115, 0, 0, 0.08, 0, 0, 0, 0, 0, 1, 0],
	199 : [0, 0, 20, 5, 0.788, 0, 0, 0.122, 0, 0, 0, 0, 0, 1, 0],
	200 : [0, 0, 20, 5, 3.18, 0, 0, 0.122, 0, 0, 0, 0, 0, 1, 0],
	202 : [0, 0, 20, 5, 8.609, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	204 : [2500, 2500, 20, 5, 3.359, 0, 0, 0.055, 0, 0, 0, 0, 0, 1, 0],
	205 : [0, 0, 20, 5, 3.144, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	207 : [0, 0, 20, 5, 1.295, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	209 : [0, 0, 20, 5, 0.319, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	210 : [0, 0, 20, 5, 0.234, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	211 : [1500, 2500, 20, 5, 0.733, 0, 0, 0.115, 0, 0, 0, 0, 0, 1, 0],
	212 : [1500, 1500, 20, 5, 0, 0.115, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	213 : [0, 0, 20, 4, 0.327, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	214 : [0, 0, 20, 4, 0.307, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	215 : [0, 0, 20, 4, 0.143, 0, 0, 0.25, 0, 0, 0.222, 0, 0, 1, 0],
	216 : [0, 0, 20, 4, 0.214, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	217 : [0, 0, 20, 4, 0.326, 0, 0, 1, 0, 0, 0.476, 0, 0, 0.414, 80],
	219 : [0, 0, 20, 4, 0.118, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	220 : [0, 0, 20, 4, 0.104, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	222 : [0, 0, 20, 4, 0.179, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	223 : [0, 0, 20, 4, 0.179, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	224 : [0, 0, 20, 4, 0.126, 0, 0, 0, 0, 0, 0.018, 0, 0, 1, 0],
	225 : [0, 0, 20, 4, 0.178, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	227 : [0, 0, 20, 4, 0.12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80],
	228 : [0, 0, 20, 4, 0.313, 0, 0, 0.28, 0, 0, 0, 0, 0, 0, 80],
	229 : [0, 0, 20, 4, 0, 0.245, 0, 0, 0, 0, 0, 0, 0, 0, 80],
	230 : [2500, 2500, 20, 7, 3.5, 0, 0, 0.133, 0, 0, 0, 0, 0, 1, 0],
	231 : [2E3, 2E3, 20, 7, 1.088, 0, 0, 0.133, 0, 0, 0, 0, 0, 1, 0],
	232 : [0, 0, 20, 7, 0.816, 0, 0, 0.133, 0, 0, 0, 0, 0, 1, 0],
	233 : [0, 0, 20, 7, 1.762, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	234 : [0, 0, 20, 7, 0, 0.927, 0, 0, 0.053, 0, 0, 0, 0, 1, 0],
	236 : [0, 0, 20, 7, 0.574, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	237 : [0, 0, 20, 7, 0.683, 0, 0, 0.112, 0, 0, 0, 0, 0, 1, 0],
	239 : [0, 0, 20, 7, 0.529, 0.142, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	241 : [0, 0, 20, 12, 0, 1.688, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	243 : [0, 0, 20, 7, 0, 0.869, 0, 0, 0.056, 0, 0, 0, 0, 1, 0],
	244 : [0, 0, 20, 7, 0, 0.609, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	245 : [0, 0, 20, 7, 0.028, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	247 : [1500, 3E3, 20, 7, 2.989, 0, 0, 0.133, 0, 0, 0, 0, 0, 1, 0],
	248 : [2E3, 2E3, 20, 7, 1.579, 0, 0, 0.242, 0, 0, 0, 0, 0, 1, 0],
	249 : [1500, 1500, 20, 7, 5.978, 0, 0, 0.133, 0, 0, 0, 0, 0, 1, 0],
	250 : [1500, 2500, 20, 7, 0.767, 0, 0, 0.133, 0, 0, 0, 0, 0, 1, 0],
	251 : [1500, 2500, 20, 7, 0.575, 0, 0, 0.133, 0, 0, 0, 0, 0, 1, 0],
	252 : [0, 0, 20, 7, 0.389, 0, 0, 0, 0, 0, 0, 0, 0, 0.35, 80],
	253 : [0, 0, 20, 7, 0.267, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	254 : [0, 0, 20, 12, 0.736, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	255 : [0, 0, 20, 7, 2.353, 0.742, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	256 : [1500, 1500, 20, 7, 0.096, 0, 0, 0.3, 0, 0, 0, 0, 0, 1, 0],
	257 : [0, 0, 20, 12, 9.353, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	258 : [0, 0, 20, 7, 0.683, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	259 : [0, 0, 20, 12, 9.2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	260 : [0, 0, 20, 12, 1.24, 1.24, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	261 : [0, 0, 20, 7, 1.63, 0, 0, 0.133, 0, 0, 0, 0, 0, 1, 0],
	263 : [0, 0, 20, 12, 0, 0.8, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	264 : [0, 0, 20, 12, 3.424, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	265 : [0, 0, 20, 12, 0, 10, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	266 : [0, 0, 20, 9, 1.368, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	267 : [0, 0, 20, 12, 1.32, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	268 : [0, 2500, 20, 9, 1.547, 0, 0, 0.238, 0, 0, 0, 0, 0, 1, 0],
	269 : [0, 0, 20, 9, 0, 0.144, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	270 : [0, 0, 20, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	271 : [0, 0, 20, 9, 0.153, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	273 : [0, 0, 20, 9, 0.133, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	274 : [0, 0, 20, 9, 2.024, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	275 : [0, 0, 20, 9, -0.191, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	278 : [0, 0, 20, 9, 0.784, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	279 : [0, 0, 20, 9, 2.437, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	280 : [0, 0, 20, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	281 : [0, 0, 20, 9, 0.114, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	282 : [0, 0, 20, 9, 0.08, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	283 : [0, 0, 20, 12, 1.44, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	285 : [2E3, 2500, 20, 9, 0.123, 0, 0, 0.11, 0, 0, 0, 0, 0, 1, 0],
	286 : [1500, 1500, 20, 9, 0.737, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	288 : [0, 0, 20, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	289 : [0, 0, 20, 9, 0, 0.332, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	290 : [0, 0, 20, 9, 0.332, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	291 : [2E3, 2E3, 20, 9, 0, 0.692, 0.439, 0, 0, 0, 0, 0, 0, 0.55, 80],
	292 : [2500, 2500, 20, 9, 0.573, 0, 0, 0.15, 0, 0, 0, 0, 0, 1, 0],
	293 : [0, 0, 20, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	297 : [0, 0, 20, 9, 0.201, 0, 0, 0.16, 0, 0, 0, 0, 0, 1, 0],
	298 : [0, 0, 20, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	299 : [0, 0, 20, 9, 0.638, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	300 : [0, 0, 20, 9, 9.706, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	301 : [1500, 1500, 20, 9, 0.322, 0, 0, 0.17, 0, 0, 0, 0, 0, 1, 0],
	302 : [2E3, 2E3, 20, 9, 0.252, 1.761, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	303 : [0, 0, 20, 9, 0.638, 0, 0, 0.15, 0, 0, 0, 0, 0, 1, 0],
	304 : [0, 0, 20, 9, 1.333, 0, 0, 0.15, 0, 0, 0, 0, 0, 1, 0],
	305 : [0, 0, 20, 9, 0.063, 0, 0, 0.35, 0, 0, 0, 0, 0, 1, 0],
	306 : [1700, 3E3, 20, 9, 0.62, 0, 0, 0.11, 0, 0, 0, 0, 0, 1, 0],
	307 : [0, 0, 20, 9, 3.69, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	308 : [0, 0, 20, 9, 0, 0.714, 0, 0, 0.11, 0, 0, 0, 0, 1, 0],
	309 : [0, 0, 20, 9, 0.727, 0, 0, 0.09, 0, 0, 0, 0, 0, 1, 0],
	310 : [0, 0, 20, 9, 0.169, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	311 : [0, 0, 20, 9, 0.783, 0, 0, 0.175, 0, 0, 0, 0, 0, 1, 0],
	312 : [0, 0, 20, 9, 0.46, 0, 0, 0.15, 0, 0, 0, 0, 0, 1, 0],
	313 : [4E3, 4E3, 20, 9, 2.543, 0, 0, 0.225, 0, 0, 0, 0, 0, 1, 0],
	314 : [0, 0, 20, 9, 1.943, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	315 : [0, 0, 20, 9, 0.758, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	316 : [1500, 1500, 20, 9, 0, 0.232, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	318 : [2E3, 2E3, 20, 7, 1.435, 0, 0, 0.242, 0, 0, 0, 0, 0, 1, 0],
	321 : [3E3, 3E3, 20, 11, 2.633, 0, 0, 0.15, 0, 0, 0, 0, 0, 1, 0],
	322 : [0, 0, 20, 5, 4.242, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	324 : [0, 0, 20, 9, 0.03, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	325 : [0, 0, 20, 9, 0.03, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	329 : [0, 0, 20, 7, 0.178, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	330 : [0, 0, 20, 7, 1.987, 0, 0, 0.08, 0, 0, 0, 0, 0, 1, 0],
	331 : [0, 0, 20, 7, 1.113, 0, 0, 0.17, 0, 0, 0, 0, 0, 1, 0],
	332 : [0, 0, 20, 7, 0.752, 0, 0, 0.173, 0, 0, 0, 0, 0, 1, 0],
	350 : [0, 0, 20, 7, 1.186, 0, 0, 0.242, 0, 0, 0, 0, 0, 1, 0],
	353 : [1500, 3500, 20, 9, 1.004, 0.035, 0, 0.242, 0, 0, 0, 0, 0, 1, 0],
	355 : [3E3, 3E3, 20, 7, 9.564, 0, 0, 0.133, 0, 0, 0, 0, 0, 1, 0],
	358 : [0, 0, 20, 7, 0.54, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	367 : [3E3, 3E3, 20, 5, 9.564, 0, 0, 0.15, 0, 0, 0, 0, 0, 1, 0],
	368 : [0, 0, 20, 7, 0.019, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	370 : [0, 0, 20, 11, 0.229, 0.128, 0, 0.21, 0, 0, 0, 0, 0, 1, 0],
	372 : [1500, 1500, 20, 1, 0.246, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	373 : [0, 0, 20, 9, 0.248, 0, 0, 0.15, 0, 0, 0, 0, 0, 1, 0],
	376 : [0, 0, 20, 11, 5.3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	377 : [3500, 3500, 20, 11, 1.124, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	378 : [1500, 2E3, 20, 11, 0.582, 0, 0, 0.12, 0, 0, 0, 0, 0, 1, 0],
	380 : [0, 0, 20, 7, 0.869, 0, 0, 0.15, 0, 0, 0, 0, 0, 1, 0],
	381 : [0, 0, 20, 12, 0, 1.2, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	383 : [2E3, 2E3, 25, 11, 1.535, 0, 0, 0.32, 0, 0, 0, 0, 0, 1, 0],
	384 : [0, 0, 20, 11, 0.095, 0.221, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	385 : [0, 0, 20, 11, 0.946, 0, 0, 0.19, 0, 0, 0, 0, 0, 1, 0],
	386 : [0, 0, 20, 12, 4.8, 0.736, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	390 : [0, 0, 20, 12, 4.8, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	391 : [0, 0, 20, 12, 4.8, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	392 : [0, 0, 20, 12, 4.8, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	393 : [0, 0, 20, 12, 4.8, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	394 : [0, 0, 20, 12, 0, 0, 0.736, 0, 0, 0, 0, 0, 0, 1, 0],
	395 : [0, 0, 20, 12, 0, 0, 0.736, 0, 0, 0, 0, 0, 0, 1, 0],
	396 : [0, 0, 20, 12, 1.32, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	397 : [0, 0, 20, 12, 1.32, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	398 : [0, 0, 20, 5, 0.154, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	399 : [0, 0, 20, 5, 0.154, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	400 : [0, 0, 20, 4, 0.6, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	401 : [0, 0, 20, 12, 27.32, 0, 0, 0.05, 0, 0, 0, 0, 0, 1, 0],
	402 : [0, 0, 20, 12, 27.32, 0, 0, 0.05, 0, 0, 0, 0, 0, 1, 0],
	403 : [0, 0, 20, 12, 27.32, 0, 0, 0.05, 0, 0, 0, 0, 0, 1, 0],
	404 : [0, 0, 20, 12, 27.32, 0, 0, 0.05, 0, 0, 0, 0, 0, 1, 0],
	405 : [0, 0, 20, 12, 27.32, 0, 0, 0.05, 0, 0, 0, 0, 0, 1, 0],
	406 : [0, 0, 20, 12, 27.32, 0, 0, 0.05, 0, 0, 0, 0, 0, 1, 0],
	407 : [0, 0, 20, 12, 27.32, 0, 0, 0.05, 0, 0, 0, 0, 0, 1, 0],
	408 : [0, 0, 20, 8, 1.392, 0, 0, 0.225, 0, 0, 0, 0, 0, 0.8, 80],
	409 : [0, 0, 20, 12, 4.8, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	410 : [2E3, 2E3, 20, 9, 0.148, 0.499, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	418 : [1500, 1500, 20, 5, 1.178, 0, 0, 0.055, 0, 0, 0, 0, 0, 1, 0],
	462 : [0, 0, 20, 12, 0, 0.608, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	463 : [0, 0, 20, 12, 0, 0.608, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	464 : [0, 0, 20, 12, 0, 0.608, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	465 : [0, 0, 20, 12, 0, 0.608, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	493 : [0, 0, 20, 11, 0.335, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	494 : [0, 0, 20, 11, 0, 0, 0.457, 0, 0, 0, 0, 0, 0, 1, 0],
	496 : [0, 0, 20, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	499 : [0, 0, 20, 2, 0.079, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	500 : [2E3, 2E3, 20, 7, 1.435, 0, 0, 0.242, 0, 0, 0, 0, 0, 1, 0],
	538 : [3E3, 3E3, 20, 2, 11.397, 0, 0, 0.108, 0, 0, 0, 0, 0, 1, 0],
	563 : [0, 0, 20, 12, 0.106, 0, 0, 0.35, 0, 0, 0, 0, 0, 1, 0],
	569 : [0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	571 : [0, 0, 20, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	572 : [0, 0, 20, 8, 0.278, 0, 0, 0.25, 0, 0, 0, 0, 0, 1, 0],
	578 : [2400, 2400, 0, 3, 0.73, 0, 0, 0.11, 0, 0, 0, 0, 0, 1, 0],
	579 : [0, 0, 20, 12, 13.965, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	581 : [0, 0, 20, 3, 0.82, 0, 0, 0.16, 0, 0, 0, 0, 0, 1, 0],
	582 : [0, 0, 20, 12, 0.376, 0, 0, 0.173, 0, 0, 0, 0, 0, 1, 0],
	583 : [0, 0, 20, 8, 1.318, 0, 0, 0.164, 0, 0, 0, 0, 0, 1, 0],
	588 : [0, 0, 20, 12, 0, 0.633, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	592 : [0, 0, 20, 12, 0.075, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	593 : [0, 0, 20, 1, 0.075, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	594 : [0, 0, 20, 1, 0.075, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	596 : [1500, 1500, 20, 1, 0.383, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	597 : [0, 0, 20, 1, 0.383, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	598 : [0, 0, 20, 1, 0.383, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	602 : [0, 0, 20, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	603 : [0, 0, 20, 8, 0, 0.278, 0, 0, 0.25, 0, 0, 0, 0, 1, 0],
	606 : [0, 0, 20, 1, 0.075, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	620 : [0, 0, 20, 9, 0, 0.501, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	622 : [2E3, 2E3, 20, 9, 1.593, 0, 0, 0.166, 0, 0, 0, 0, 0, 1, 0],
	623 : [0, 0, 20, 12, 0.169, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	624 : [0, 0, 20, 9, -0.191, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	625 : [0, 0, 20, 2, 0.622, 0.622, 0, 0.108, 0.108, 0, 0, 0, 0, 1, 0],
	627 : [0, 0, 20, 2, 2.072, 0.346, 0, 0.108, 0, 0, 0, 0, 0, 0.25, 80],
	628 : [0, 0, 20, 12, 0.03, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	629 : [1700, 3E3, 20, 9, 0.704, 0, 0, 0.11, 0, 0, 0, 0, 0, 1, 0],
	633 : [0, 0, 20, 12, 0.654, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	634 : [0, 0, 20, 6, 0.498, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	638 : [0, 0, 20, 6, 0.249, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	639 : [0, 0, 20, 9, 0, -0.191, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	640 : [0, 0, 20, 9, 0.174, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
	642 : [0, 0, 20, 9, 0.174, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
	643 : [0, 0, 20, 9, 0.201, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	644 : [0, 0, 20, 12, 1.63, 0, 0, 0.133, 0, 0, 0, 0, 0, 1, 0],
	646 : [0, 0, 20, 2, 0.664, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	649 : [0, 0, 20, 8, 0.278, 0, 0, 0.25, 0, 0, 0, 0, 0, 1, 0],
	650 : [1500, 2500, 20, 8, 0.405, 0, 0, 0.25, 0, 0, 0, 0, 0, 0, 50],
	651 : [0, 0, 20, 8, 0.41, 0, 0, 0.15, 0, 0, 0, 0, 0, 0, 50],
	652 : [1500, 2500, 20, 8, 0.405, 0, 0, 0.25, 0, 0, 0, 0, 0, 0, 50],
	653 : [0, 0, 20, 12, 1.076, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	654 : [0, 0, 20, 7, 2.79, 0, 0, 0.12, 0, 0, 0, 0, 0, 1, 0],
	655 : [0, 0, 20, 12, 0.994, 0, 0, 0.08, 0, 0, 0, 0, 0, 1, 0],
	656 : [0, 0, 20, 7, 1.395, 0, 0, 0.12, 0, 0, 0, 0, 0, 1, 0],
	658 : [0, 0, 20, 2, 1.296, 0, 0, 0.14, 0, 0, 0, 0, 0, 1, 0],
	659 : [0, 0, 20, 2, 2.591, 0, 0, 0.14, 0, 0, 0, 0, 0, 1, 0],
	660 : [0, 0, 20, 2, 0, 0.095, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	661 : [0, 0, 20, 9, 1.333, 0, 0, 0.15, 0, 0, 0, 0, 0, 1, 0],
	662 : [0, 0, 20, 9, 0.153, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	663 : [0, 0, 20, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	664 : [0, 0, 20, 5, 0.646, 0, 0, 0.165, 0, 0, 0, 0, 0, 1, 0],
	666 : [0, 0, 20, 5, 0.514, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	667 : [0, 0, 20, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	668 : [0, 0, 20, 7, 0.028, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	672 : [2E3, 2E3, 20, 8, 0.235, 0, 0, 0.1, 0, 0, 0, 0, 0, 1, 0],
	673 : [2500, 2500, 20, 8, 0.328, 0, 0, 0.242, 0, 0, 0, 0, 0, 1, 0],
	674 : [2500, 2500, 20, 8, 0.259, 0, 0, 0.15, 0, 0, 0, 0, 0, 1, 0],
	675 : [2E3, 2E3, 20, 8, 0.662, 0.103, 0, 0.202, 0, 0, 0, 0, 0, 1, 0],
	678 : [0, 0, 20, 2, 0.708, 0, 0, 0.4, 0, 0, 0, 0, 0, 1, 0],
	679 : [0, 0, 20, 12, 1.24, 1.24, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	680 : [0, 0, 20, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	681 : [0, 0, 20, 12, 0, 0, 9.2, 0, 0, 0, 0, 0, 0, 1, 0],
	682 : [0, 0, 20, 12, 0, 0.736, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	684 : [0, 0, 20, 3, 0.409, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	685 : [0, 0, 20, 3, 0.409, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	686 : [0, 0, 20, 5, 0.633, 0, 0, 0.115, 0, 0, 0, 0, 0, 1, 0],
	687 : [0, 0, 20, 5, 2.353, 0.742, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	689 : [0, 0, 20, 7, 0.376, 0, 0, 0.173, 0, 0, 0, 0, 0, 1, 0],
	690 : [0, 0, 20, 5, 2.353, 0.742, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	691 : [0, 0, 20, 5, 5.977, 0, 0, 0.16, 0, 0, 0, 0, 0, 1, 0],
	692 : [0, 0, 20, 5, 0.346, 0, 0, 0.173, 0, 0, 0, 0, 0, 1, 0],
	693 : [0, 0, 20, 12, 0, 4, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	697 : [0, 0, 20, 9, 0.114, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	699 : [0, 0, 20, 3, 0, 1.44, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	700 : [1500, 3E3, 20, 9, 0, 0.147, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	702 : [0, 0, 20, 9, 0.116, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	703 : [0, 0, 20, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	705 : [0, 0, 20, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	706 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	707 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	708 : [500, 500, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	709 : [0, 0, 20, 3, 1.1, 0.423, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	711 : [0, 0, 20, 12, 1.32, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	712 : [0, 0, 20, 12, 2.353, 0.742, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	716 : [0, 0, 20, 11, 0.928, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	717 : [0, 0, 20, 12, 2.353, 0.742, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	720 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	721 : [0, 0, 20, 9, 3.69, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	723 : [0, 0, 20, 5, 22.456, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	725 : [1500, 3E3, 20, 9, 0, 0.148, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	726 : [0, 0, 20, 8, 0, 1.113, 0, 0, 0.17, 0, 0, 0, 0, 1, 0],
	727 : [0, 0, 20, 12, 0.264, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	730 : [0, 0, 20, 8, 1.575, 0.235, 0, 0.238, 0, 0, 0, 0, 0, 0.88, 80],
	734 : [0, 0, 20, 12, 0.174, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	737 : [0, 0, 20, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	738 : [0, 0, 20, 5, 3.144, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	739 : [0, 0, 20, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	740 : [0, 0, 20, 11, 0.095, 0.221, 0, 0, 0.2, 0, 0, 0, 0, 1, 0],
	741 : [0, 0, 20, 12, 1.24, 1.24, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	746 : [0, 0, 20, 12, 0, 0, 0.589, 0, 0, 0, 0, 0, 0, 1, 0],
	747 : [0, 0, 20, 5, 0.177, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	749 : [0, 0, 20, 3, 0.184, 0, 0, 0.35, 0, 0, 0, 0, 0, 1, 0],
	753 : [0, 0, 20, 1, 0.094, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	754 : [0, 0, 20, 12, 2.64, 1.32, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	755 : [0, 0, 20, 7, 0, 7.61, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	756 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
	757 : [0, 0, 20, 9, 1.334, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	758 : [0, 0, 20, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	763 : [0, 0, 20, 2, 0.907, 0, 0, 0.14, 0, 0, 0, 0, 0, 1, 0],
	764 : [0, 0, 20, 2, 1.814, 0, 0, 0.14, 0, 0, 0, 0, 0, 1, 0],
	765 : [0, 0, 20, 2, 2.721, 0, 0, 0.14, 0, 0, 0, 0, 0, 1, 0],
	766 : [2E3, 2E3, 20, 11, 0, 0.038, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	778 : [0, 0, 20, 11, 0.231, 2.337, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	779 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	794 : [0, 0, 20, 9, 0, 2.514, 0, 0, 0.17, 0, 0, 0, 0, 1, 0],
	839 : [0, 0, 20, 2, 0.237, 0, 0, 0.3, 0, 0, 0, 0, 0, 1, 0],
	840 : [0, 0, 20, 9, 0.485, 0, 0, 0.12, 0, 0, 0, 0, 0, 1, 0],
	841 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	842 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	843 : [0, 0, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	844 : [0, 0, 20, 3, 0.194, 0, 0, 0.36, 0, 0, 0, 0, 0, 1, 0],
	845 : [0, 0, 20, 3, 0.184, 0, 0, 0.35, 0, 0, 0, 0, 0, 1, 0],
	847 : [0, 0, 20, 12, 0, 1.32, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	848 : [0, 0, 20, 12, 2.64, 2.64, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	850 : [0, 0, 20, 3, 0.667, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	857 : [0, 0, 20, 8, 0, 0.278, 0, 0, 0.25, 0, 0, 0, 0, 1, 0],
	868 : [0, 0, 20, 9, 0.589, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	869 : [1500, 3E3, 20, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
	870 : [1500, 3E3, 20, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0]
};
if (typeof _globalvar == "undefined")
	var _globalvar = {};
var _globalvar = {
	sitetitle : "178\u9b54\u517d\u4e16\u754c",
	tipclass : "tooltip-wow"
}, $178DB = {
	cache : {
		item : {},
		spell : {},
		quest : {},
		achievement : {}
	},
	curloading : !1,
	tip : function(b, c, e, f) {
		if (!_tip || !b)
			return !1;
		f = f || "cn";
		c = c.toLowerCase();
		_tip.show("Loading...", b, {
					pos : "topright",
					classname : "tooltip-wow"
				});
		$178DB.curloading = c + "_" + e;
		$178DB.cache[c][e] ? $178DB.updatatip(c, e) : jQuery
				.getScript("http://" + (f == "cn" ? "db1" : "db")
						+ ".178.com/wow/" + f + "/a/" + c.toLowerCase() + "/"
						+ e + ".js");
		jQuery(b).unbind("mouseout.tooltip-wow").bind("mouseout.tooltip-wow",
				function() {
					$178DB.curloading = !1
				})
	},
	updatatip : function(b, c) {
		$178DB.curloading == b + "_" + c
				&& ($178DB.cache[b][c].tip == "no data"
						? _tip.position("\u65e0\u6570\u636e")
						: _tip
								.position($178DB.cache[b][c].tip
										+ '<span class="icon-frame frame-56" style="background-image:url(http://us.battle.net/wow-assets/static/images/icons/56/'
										+ $178DB.cache[b][c].icon
										+ '.jpg);"></span>'))
	},
	regstItem : function(b) {
		$178DB.cache.item[b.id] = {
			tip : b.tip,
			icon : b.icon
		};
		$178DB.updatatip("item", b.id)
	},
	regstSpell : function(b) {
		$178DB.cache.spell[b.id] = {
			tip : b.tip,
			icon : b.icon
		};
		$178DB.updatatip("spell", b.id)
	}
};